PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: Posting Code in the Forums to learn how to do it too.
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: Posting Code in the Forums to learn how to do it too.
Why not save yourself some time & actually useusort() like your title suggests? You can use array_reverse() to handle your reverse sorting requirement, rather than writing a whole new algorithm. array_multisort() (if you know how to use it) is probably your best bet here.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.