Fwd: [PHP] Re: usort(): The argument should be an array

From: Date: Thu, 02 Mar 2006 00:35:55 +0000
Subject: Fwd: [PHP] Re: usort(): The argument should be an array
Groups: php.general 
Request: Send a blank email to php-general+get-231299@lists.php.net to get a copy of this message
let me give you more details to understand problem with the said code. go to this link, please. http://www.abcdefg.us/search/search.php in search enter, Justice, you get response without an error. Now enter law, you get error, pasted below, 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 and few lines of code above and below the error point, as the code is more tha 300 lies I had to paste tail end of code at the point of error. ---------------------------------------------------------------------- $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 (#231299) next »