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)); ?>

preferences:
25.16 ms | 404 KiB | 5 Q