- print_r: documentation ( source)
<?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));
?>