... didn't work with multi-dimensional array ... thanks anyway.
I've tried using the functions usort() and uksort(), but i didn't know how to build a specific classification function for my case, maybe it's not possible.
$list["access"][5] = "free"; //want to sort by numbers array
$list["section"][2] = "soccer";
$list["type"][3] = "news";
$list["group"][1] = "sports";
$list["publication"][4] = "programmed";
//asort($list); didn't work
//ksort($list); didn't work
//uksort($list, create_function('$a, $b', 'return strcmp($list[$a], $list[$b]);')); didn't work
//array_multisort($list, SORT_NUMERIC, array_keys($list)); didn't work
//Guru code here ... will work!
foreach($list as $cap => $arr){
foreach($arr as $order => $field){
echo $order." - ".$cap."=>".$field."<br>";
}
}
Wanted result:
1 - group=>sports
2 - section=>soccer
3 - type=>news
4 - publication=>programmed
5 - access=>free
I'm going crazy ... help me please! 😕