usort(): The argument should be an array

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

 



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;

 /**/

 }

?>

[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