3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array ( "1" => array ( "0" => "16/03/2018", "1" => "Friday", "2" => "21.00", "3" => "Friendly Match", "4" => "Italy vs France", "5" => "Truesports HD", ), "2" => array ( "0" => "17/03/2018", "1" => "Saturday", "2" => "15.30", "3" => "Friendly Match", "4" => "Italy vs Pakistan", "5" => "Truesports HD", ), "3" => array ( "0" => "17/03/2018", "1" => "Saturday", "2" => "19.00", "3" => "Friendly Match", "4" => "Spain vs USA", "5" => "Truesports" ) ); $array_keys= array("date","day","time","type","value","tv"); $newArray=array(); foreach($array as $subArr){ $newArray[] = array_combine($array_keys,$subArr); } //print_r($newArray); echo json_encode($newArray, JSON_PRETTY_PRINT);
Output for git.master, git.master_jit, rfc.property-hooks
[ { "date": "16\/03\/2018", "day": "Friday", "time": "21.00", "type": "Friendly Match", "value": "Italy vs France", "tv": "Truesports HD" }, { "date": "17\/03\/2018", "day": "Saturday", "time": "15.30", "type": "Friendly Match", "value": "Italy vs Pakistan", "tv": "Truesports HD" }, { "date": "17\/03\/2018", "day": "Saturday", "time": "19.00", "type": "Friendly Match", "value": "Spain vs USA", "tv": "Truesports" } ]

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
122.78 ms | 407 KiB | 5 Q