Welcome Guest, Not a member yet? Register   Sign In
Can anyone explain how this usort actually works
#7

Well, usort is only useful when you do not care for key association, and you need a special, complex(ish) logic to sort, like in your example, where you are sorting based on a specific key. If you have just a normal [3,5,6,4,2,1,9,8] array, then "asort" will probably be enough. Take a looksy for all the available options: http://php.net/manual/en/array.sorting.php
Reply


Messages In This Thread
RE: Can anyone explain how this usort actually works - by slax0r - 09-28-2015, 04:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB