cooldude832 Posted December 1, 2007 Share Posted December 1, 2007 I have an array that gets a bunch of data that is like ( [0] => Array ( [items] => Array ( [0] => Array ( [Description] => SWEETHEART ROSE BOUQUET - 18 STEMS W/VASE ) ) [shiping_Address] => ***************** [subtotal] => $29.99 [shipping_cost] => $10.99 [Tax] => $0.00 [Total] => $40.98 [buyer_Address] => ************************** [Order_number] => W00442101216543 [Purchase_date] => 11/29/2007 [Purchaser] => *********** [Merchant] => flowers1800 ) [1] => Array ( [Purchase_date] => 11/26/2007 [Order_number] => 4071126192538514 [Total] => $36.48 [subtotal] => $24.99 [Tax] => $1.50 [shipping_cost] => $9.99 [shipping_method] => USA Overnight [items] => Array ( [0] => Array ( [Description] => Resident Evil 4 Wii Edition- - $5 Off! [Qty] => 1 [Cost] => $24.99 ) ) [Purchaser] => ************** [Merchant] => Gamestop ) I want to sort each of the emails so the fields are consistent for view purposes, any ideas??? Link to comment https://forums.phpfreaks.com/topic/79640-sorting-the-internal-nodes-of-a-multi-dimensonial-array/ Share on other sites More sharing options...
toplay Posted December 1, 2007 Share Posted December 1, 2007 You didn't really show at least a second set of data. Anyway, look into the user defined sort functions. Examples in the manual, and search these forums for other examples. http://us2.php.net/manual/en/function.usort.php http://us2.php.net/manual/en/function.uasort.php http://us2.php.net/manual/en/function.uksort.php Link to comment https://forums.phpfreaks.com/topic/79640-sorting-the-internal-nodes-of-a-multi-dimensonial-array/#findComment-403347 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.