3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php //$dataSet = file_get_contents('ADDRESS OF DATABASE FILE'); $dataSet = "t0:4:2,t1:2:5:t0:4:2,t1:2:5:"; foreach(explode(",",$dataSet) AS $key => $subarray) { $array[$key] = explode(":",$subarray); } print_r($array); ?>
based on XcgB6
Output for 4.3.0 - 7.2.0
Array ( [0] => Array ( [0] => t0 [1] => 4 [2] => 2 ) [1] => Array ( [0] => t1 [1] => 2 [2] => 5 [3] => t0 [4] => 4 [5] => 2 ) [2] => Array ( [0] => t1 [1] => 2 [2] => 5 [3] => ) )