Sort Array in PHP
- by DonCroce
I have a script which gets some values from a DB.
The structure of the vars is as the following:
$dump["likes"] = 1234;
$likes["data"][$i]["name"] = "ABCDEFG";
for($i=0;$i<=$max;$i++){
$data[$i]["likes"] = $dump["likes"];
$data[$i]["name"] = $likes["data"][$i]["name"];
}
//Print Here Sorted array (highest value in "like" first)
I just need a way to find out in which entry the biggest "likes" are :)
So far i have tried array_multisort, but it showed me "inconsistent size" or some error...
Thanks for all your help!