Reignfire Posted May 12, 2014 Share Posted May 12, 2014 Hi, This is the output from a var_dump($array); command: array (size=381) 0 => array (size=2) 'Name' => string 'apple' (length=6) 'Number' => float 0.368844763 1 => array (size=2) 'Name' => string 'Blueberry' (length= 'Number' => float 5.59E-6 2 => array (size=2) 'Name' => string 'Cinnamon' (length=5) 'Number' => float -0.0006947 3 => array (size=2) 'Name' => string 'Date' (length=10) 'Number' => float 0.001584453 ... ... ... I want to sort this array from the highest 'Number' float value to the smallest. I tried sorting it with rsort($array,SORT_NUMERIC); but that doesn't give the correct output. What kind of 'sort' should i use to do this? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.