Fwd: [PHP] Re: usort(): The argument should be an array
| From: | Remember14a at aol dot com | Date: | Thu, 02 Mar 2006 01:22:12 +0000 |
| Subject: | Fwd: [PHP] Re: usort(): The argument should be an array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-231305@lists.php.net to get a copy of this message | ||
If I put this code
$res = array();
while($row = mysql_fetch_assoc($query_result)) {
before
usort($res, "cmp"); give this error
Parse error: parse error, unexpected $ in
/home2/wwwabcde/public_html/search/searchfuncs.php on line 316
even putting this code before
$res[$i]['size'] = $row[5];
$res[$i]['weight'] = $result_array[$row[0]];
$i++;
}
usort($res, "cmp");
gives same error.