sparks_vfr Posted July 30, 2011 Share Posted July 30, 2011 Am at my wits end here and am hoping there is a quick and easy solution.... I need to sort a multi dimentional array, the array is built as follows (abridged): $i++; $missed[$i] = array($row[3], $row[4], ($weeks - $num_rows)); so for example the data would look like : $missed[0] = array(Fred, Smith, 3) $missed[1] = array(Bert, Smith, 99) $missed[2] = array(Gerty, Blogs, 22) My problem is, how do I sort the array $missed on the last number in the array ? Or, am I going about this in the wrong way ? Quote Link to comment https://forums.phpfreaks.com/topic/243285-array-sorting/ Share on other sites More sharing options...
voip03 Posted July 30, 2011 Share Posted July 30, 2011 http://stackoverflow.com/questions/2699086/php-sort-multidimensional-array-by-value Quote Link to comment https://forums.phpfreaks.com/topic/243285-array-sorting/#findComment-1249425 Share on other sites More sharing options...
sparks_vfr Posted July 30, 2011 Author Share Posted July 30, 2011 Perfect, thank you Quote Link to comment https://forums.phpfreaks.com/topic/243285-array-sorting/#findComment-1249432 Share on other sites More sharing options...
voip03 Posted July 30, 2011 Share Posted July 30, 2011 please mark as solved. the topic solved button can be found at the bottom left of the page Quote Link to comment https://forums.phpfreaks.com/topic/243285-array-sorting/#findComment-1249433 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.