Remember14a@xxxxxxx wrote:
*If I put this *code
$res = array();
while($row = mysql_fetch_assoc($query_result)) {
before
usort($res, "cmp"); give this error
**
**
*Parse error*: parse error, unexpected $ in
*/home2/wwwabcde/public_html/search/searchfuncs.php* on line *316*
**
*even * putting this code before
$res[$i]['size'] = $row[5];
$res[$i]['weight'] = $result_array[$row[0]];
$i++;
}
usort($res, "cmp");
gives same error.
You need to put
$res = array();
before you start looping over your mysql query results.
We didn't see all your code so we can't give you an *exact* line number
or place to put it.
You need to adjust what you were told to fit into your code.
If you need more help, post your entire code block in
http://www.pastebin.com and send us a url to look at.
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php