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. Quote Link to comment Share on other sites More sharing options...
ldb358 Posted December 23, 2010 Share Posted December 23, 2010 try using: sort($price); 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.