mikembley Posted April 4, 2007 Share Posted April 4, 2007 Im Ok with PHP but as i am learning i find it is sometimes hard to find the things you want to know, So i came here Smile //Array held in $aData Array ( [0] => Array ( [0] => 817 [1] => 5.6" Venus TFT Photo Player White - PhotoMP3VideoGameClock SDCF Flash with USB2 & Remote [2] => 63.43 [3] => Takes Care of all your Photo's - MP3 - Display Clock - Slide Show - Voice Recorder [4] => 1 [5] => 817 [6] => [iFindAll] => 252 ) [1] => Array ( [0] => 818 [1] => 7" Scan Widescreen Pframe USB2 MP4321 DiVX Remote & All in 1 Flash card Reader TVOut Audio Out [2] => 66.60 [3] => Ideal for the Home - Show all your photo's! - The Quick & Easy way to view and share uour pictures instantly. [4] => 1 [5] => 818 [6] => ) [2] => Array ( [0] => 819 [1] => 7" ATMT MINIVIEW Widescreen Digital Photo Frame [2] => 80.07 [3] => 7" TFT Active Matrix LCD [4] => 1 [5] => 819 [6] => ) ) What i want to do is sort $aDatas arrays by price, Which would be $aData[$i][2] . Ive tried multiple methods, but i cant seem to make anything of them, Hopefully someone will be able to help Would this be a 2-dimensional array? Im learning as i go by. Thanks Link to comment https://forums.phpfreaks.com/topic/45538-array-sorting/ Share on other sites More sharing options...
obsidian Posted April 4, 2007 Share Posted April 4, 2007 You'll need to use array_multisort(). Good luck! Link to comment https://forums.phpfreaks.com/topic/45538-array-sorting/#findComment-221080 Share on other sites More sharing options...
Barand Posted April 4, 2007 Share Posted April 4, 2007 see http://www.phpfreaks.com/forums/index.php/topic,134171.msg565850.html#msg565850 Link to comment https://forums.phpfreaks.com/topic/45538-array-sorting/#findComment-221096 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.