Stooney Posted March 5, 2008 Share Posted March 5, 2008 I'm having trouble understanding the manual on this. I need to sort this array by the value of 'biddernum' ASC. Here's an example of the array I'm working with: Array ( [0] => Array ( [biddernum] => 1098 [barcode] => [price] => 13 ) [1] => Array ( [biddernum] => 1088 [barcode] => [price] => 16 ) [2] => Array ( [biddernum] => 1136 [barcode] => [price] => 13 ) ) Any help is appreciated. Quote Link to comment Share on other sites More sharing options...
rhodesa Posted March 5, 2008 Share Posted March 5, 2008 <?php $array; //This would be the array you did a print_r on //Get values of biddernum $sort_array = array(); foreach($array as $n=>$items) $sort_array[$n] = $items['biddernum']; //Do sort array_multisort($sort_array,$array); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.