Well after some research i found a simple solution like this
asort($data['order']);
$keys = array_keys($data['order']);
$data['name'] = array_replace(array_flip($keys), $data['name']);
$data['link'] = array_replace(array_flip($keys), $data['link']);
$data['order'] = array_replace(array_flip($keys), $data['order']);
Although i dont want to apply array_replace
and array_flip
on all the keys but this is done for the time being. I will surely trying to find how i can do it with single instruction.
solved Sort php different format multidimensional array on key