Is it possible in PHP to do something like this? How would you go about writing a function? Here is an example. The order is the most important thing.
$custo
IF you have array in your array, you'll have to adapt the function by Eran a little bit...
function sortArrayByArray($array,$orderArray) {
$ordered = array();
foreach($orderArray as $key => $value) {
if(array_key_exists($key,$array)) {
$ordered[$key] = $array[$key];
unset($array[$key]);
}
}
return $ordered + $array;
}