Knowledgebase
Portal Home > Knowledgebase > Articles Database > Echoing out highest to lowest
Echoing out highest to lowest
Posted by Phalanxer, 07-15-2012, 01:22 PM Is it possible to echo out something by highest to lowest? For example: $set1 = 7; $set2 = 10; $set3 = 4; Then have PHP echo highest to lowest? something like: Set 2 foobar Set 1 foobar Set 3 foobar ?
Posted by Phalanxer, 07-15-2012, 01:38 PM Never mind... an array and rsort() should do it.
Posted by josephgarbett, 07-15-2012, 04:12 PM To compare values, ideally, they must be stored in an array.
Add to Favourites Print this Article
Also Read