3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = Array ( 'make' =>Array ( '0' =>'Volvo', '1' =>'Volvonew' ) , 'model' =>Array ( '0' =>'FH16', '1' => 123 ) , 'vehicleno' =>Array ( '0' =>'RS95SMB', '1' =>'RS95SMB' ) , 'reg_state' =>Array ( '0' =>'QLDS', '1' =>'QLDS' ) ); $i=0; $return = array(); foreach($array as $key=>$value) { $return[$i][$key] = $value[$i]; $return[$i+1][$key] = $value[$i+1]; } print_r(($return)); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [make] => Volvo [model] => FH16 [vehicleno] => RS95SMB [reg_state] => QLDS ) [1] => Array ( [make] => Volvonew [model] => 123 [vehicleno] => RS95SMB [reg_state] => QLDS ) )

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:
26.42 ms | 406 KiB | 5 Q