I have a lot of array based explode a string like this :
$size = explode(",", $row->SIZE);
$coil_no = explode(",", $row->COIL_NO);
$net = explode(",", $row->NET);
$gross = explode(",", $row->GROSS);
$contract_no = explode(",", $row->CONTRACT_NO);
$location = explode(",", $row->LOCATION);
How can I unite those array into one multidimensional array ?
I have try like this :
foreach ($size as $value) {
foreach ($coil_no as $coil) {
$detail[] = array(
"coil_no" => $coil,
"size" => $value
);
}
}
you know the result the looping is loop weird, I need more elegant array, like
foreach ($unite_array as $row) :
echo "<tr> $row->size </tr>" ;
endforeach;
What the best way to unite those array ?