usort(): The argument should be an array

From: Date: Tue, 28 Feb 2006 15:00:33 +0000
Subject: usort(): The argument should be an array
Groups: php.general 
Request: Send a blank email to php-general+get-231205@lists.php.net to get a copy of this message
Can anyone comment and fix this error ------------------------ Warning: usort(): The argument should be an array in /home2/wwwabcde/public_html/search/searchfuncs.php on line 300 ------------------------------------------------ below is part of the code which gives this error, the line highlighted in red is the point where error is pointing, ---------------------------------------------------------------------- $row[4]; $res[$i]['size'] = $row[5]; $res[$i]['weight'] = $result_array[$row[0]]; $i++; } usort($res, "cmp"); echo mysql_error(); $res['maxweight'] = $maxweight; $res['results'] = $results; return $res; /**/ } ?>

« previous php.general (#231205) next »