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 = $samp."". $vales; if (next($arryvalue)) { $samp = $samp.","; } else{ $samp = $samp.","; } } echo rtrim($samp,",");
Output for 4.3.0 - 7.1.0
a,b,c,d,e,f