3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = '{ "C1": [ "<img src=\"available.png\">", "<img src=\"available.png\">", "<img src=\"available.png\">", "<img src=\"available.png\">" ], "C10": [ "<img src=\"available.png\">", "<img src=\"available.png\">", "<img src=\"available.png\">", "<img src=\"available.png\">" ], "C11": [ "<img src=\"available.png\">", "<img src=\"available.png\">", "<img src=\"available.png\">", "<img src=\"available.png\">" ], "C12": [ "<img src=\"available.png\">", "<img src=\"available.png\">", "<img src=\"available.png\">", "<img src=\"available.png\">" ] }'; $json = json_decode($str, true); foreach($json as $key=>$val){ echo $key." ".implode($val)."\n"; } // note: replace \n with <br/>
based on Te1kE
Output for 5.3.23 - 7.2.6
C1 <img src="available.png"><img src="available.png"><img src="available.png"><img src="available.png"> C10 <img src="available.png"><img src="available.png"><img src="available.png"><img src="available.png"> C11 <img src="available.png"><img src="available.png"><img src="available.png"><img src="available.png"> C12 <img src="available.png"><img src="available.png"><img src="available.png"><img src="available.png">