Re: Problem with usort
| From: | Stut | Date: | Thu, 04 May 2006 15:50:24 +0000 |
| Subject: | Re: Problem with usort | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-235525@lists.php.net to get a copy of this message | ||
Jon Earle wrote:
$ret_val = 0; if ($aday == $bday) {$ret_val = 0;} else {$ret_val = ($aday < $bday) ? -1 : 1;} return ret_val;I could be wrong, but I think you need some extra brackets on the else line... else {$ret_val = (($aday < $bday) ? -1 : 1);} -Stut