rodger Posted December 22, 2010 Share Posted December 22, 2010 Hello, I have a variable called $Price, We are getting it through Mysql Database using While loop. We getting the data from database in ordered by ID. Now then i have requirement to store that data into Low to High form ... Like we are receiving $price lke unordered form .. 50 14 35 25 00 145 52 Here i just want to store it in Low to high form like 00, 14,25,35 ... and so on .. Please suggest me the appropriate code. While($myrow=mysql_fetch_array($result, MYSQL_ASSOC)) { some codes return value $price. // want to store in array } $array($price) // here want to store in Low to high with key value. Link to comment https://forums.phpfreaks.com/topic/222437-getting-the-data-through-mysql-want-to-store-in-array-store-data-in-array/ Share on other sites More sharing options...
ldb358 Posted December 23, 2010 Share Posted December 23, 2010 try using: sort($price); Link to comment https://forums.phpfreaks.com/topic/222437-getting-the-data-through-mysql-want-to-store-in-array-store-data-in-array/#findComment-1150558 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.