posted 09/30/2008 by Chris
Comments: 0

This was originally a tutorial I wrote for bakery.cakephp.org, but it didn't get published because it was "more a general PHP tip than a CakePHP article."  Haters.

Anyways, if you're using the function usort inside of a cakephp controller and are receiving errors like "Warning: usort() [function.usort]: Invalid comparison function in...", then you may be referencing your sorting function incorrectly.  Also useful examples showing how to use Unix timestamps (date/mktime)...