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. Link to comment https://forums.phpfreaks.com/topic/94563-array_multisort/ 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); ?> Link to comment https://forums.phpfreaks.com/topic/94563-array_multisort/#findComment-484211 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.