3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arryvalue = array( "a","b","c","d","e","f" ); $samp = ""; foreach ($arryvalue as $vales) { $samp = "". $vales; if (next($arryvalue)) { echo ','; } else{ echo ','; } } echo rtrim($samp,",");
Output for 4.3.0 - 7.1.0
,,,,,,f