I have 3 arrays containing 3 pieces of info. Probably easier to show you, here:
$dataPoints = array(
array('1' => '33','2' => 'dave','3' => '367'),
array('1' => '168','2' => 'susan','3' => '56788'),
array('1' => '99','2' => 'tim','3' => '6')
foreach ($dataPoints as $key => $row) {
$x[$key] = $row['1'];
$y[$key] = $row['2'];
$z[$key] = $row['3'];
}
$aaa = array_multisort($x, SORT_DESC, $y, SORT_ASC, $z, $dataPoints);
print_r($aaa);
I am trying to sort the lowest '3' (3rd column) value, then output all 3 answers for that array.
So, '6' is the lowest on the 3rd column. Then output '99', 'tim' & '6'.
What am I doing wrong?