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

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

 




$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;

/**/

}

?>

That's not enough, we need the part that sits above and in between the brace where $res gets filled.
You could also put mysql_error(); above the usort-statement.
Is it possible that $res has once been the return-value of mysql_query() ?

Don't forget to var_dump() your values _before_ the error can occur.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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