I have a multidimensional array with 3 keys ("length", "width" and "height). Each key is associated with an array of values:
$data = [
"length" => ["12", "44"],
"width" => ["22", "45"],
"height" => ["22", "34"]
];
How can I transpose the columns of each key into rows of 3 columns as follows:
$rows = [
["length" => "12", "width" => "22", "height" => "22"],
["length" => "44", "width" => "45", "height" => "34"]
];
forloop with that element count and try to make new arrays from existing ones?