3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array[0][0] = "a"; $array[0][1] = "b"; $array[0][2] = "c"; //1 echo implode(",", $array[0]); //2 echo implode(",", array_map(function($v){ return implode(",", $v); }, $array)); //3 $it = new RecursiveArrayIterator($array); foreach ($it as $v) echo $v; //4 array_walk_recursive($array, function($v, $k){ echo $v . "<br>"; }); //5 foreach($array[0] as $v) echo $v; //6 foreach($array as $ia){ foreach($ia as $v) echo $v; }
based on Pg4gC
Output for 5.4.2 - 7.2.0
a,b,ca,b,c Notice: Array to string conversion in /in/WOG6s on line 20 Arraya<br>b<br>c<br>abcabc
Output for 5.3.18 - 5.3.29
a,b,ca,b,cArraya<br>b<br>c<br>abcabc