php: parse error on mysql query
Posted
by
dwstein
on Stack Overflow
See other posts from Stack Overflow
or by dwstein
Published on 2012-06-26T03:07:14Z
Indexed on
2012/06/26
3:15 UTC
Read the original article
Hit count: 104
I'm getting the following error:
Parse error: syntax error, unexpected T_VARIABLE in /home/a4999406/public_html/willingLog.html on line 48
on the following code (line 48 is first row of this code):
$rows = mysql_num_rows($result);
for ($j=0; $j<$rows: ++$j)
{
echo 'ID: ' . mysql_result($result, $j, 'id') . '<br />';
echo 'First: ' . mysql_result($result, $j, 'first') . '<br />';
echo 'Last: ' . mysql_result($result, $j, 'last') . '<br />';
echo 'Email: ' . mysql_result($result, $j, 'email') . '<br />';
}
Anyone know what i'm doing wrong?
© Stack Overflow or respective owner