Re: usort(): The argument should be an array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28/02/06, Remember14a@xxxxxxx <Remember14a@xxxxxxx> wrote:> 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
[...]
>   usort($res, "cmp");
Put a print_r($res) above this line and see what the contents of $resare. Whatever it is, it's not an array.  Probably because your mysqlresult set is empty and you forgot to initialise $res before youlooped through it (assuming the junk above is the tail end of a loop).
  -robin

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux