3v4l.org

run code in 200+ 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."". $vales.","; } else{ $samp = $samp."". $vales.","; } } echo rtrim($samp,",");
Output for 5.3.0 - 7.2.0
aa,bb,cc,dd,ee,ff