I have this array $arr1
Array
(
[0] => [col1]
[1] => [col2]
[2] => [col3]
)
I have another array $arr2 as
Array
(
[0] => Array
(
[col3] => data1
[col2] => data2
[col1] => data3
)
[1] => Array
(
[col2] => data1
[col3] => data2
[col1] => data3
)
)
I need to sort this $arr2 keys as col1, col2 and col3 like as it is on $arr1.
I tried with array_multisort($arr1,$arr2) and the other way. Nothing worked. any help on this ?