for example
Code: Select all
$matched_users= array (
"21" =>array(1),
"49" =>array(1,4,8,2),
"39" =>array(1, 2, 3, 4, 5, 6),
"11" =>array(),
"3" =>array(2,5)
);Code: Select all
$matched_users= array (
"39" =>array(1, 2, 3, 4, 5, 6),
"49" =>array(1,4,8,2),
"3" =>array(2,5),
"21" =>array(1),
"11" =>array()
);Code: Select all
foreach($matched_users as $key => $value){
$matched_order[$key] = count($value);
}before this i was playing about with a foreach with nested if statements but that just made a mess of the array and didn't work properly...
is there a way I can clean this up and sort the actual array itself so i dont have to use the second array?
thanks
rj