On 28/02/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > No this doesnt solve error. > 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
Yeah, sure. So you know $res *isn't* an array, which is why you're getting the warning that "The argument should be an array". So you need to find out what *is* in $res, which is why I suggested the print_r(). Now do a var_dump($res) and see what *is* in $res. Then you'll have to work out *why* it's not an array - and the answer to that is somewhere in those 300 lines of code you can't post. The few lines at the end of the loop seem to be treating $res as an array. But as it's *not* an array, either those lines aren't being executed or you've initialised $res to something silly beforehand, like a string. -robin