I have this PHP code and I am getting this error: Parse error: syntax error, unexpected ‘}’, expecting ‘;’ in [File Location] on line 120
The line with while($array etc etc) is line 120.
if($numrows != 0)
{
do
{
//echo "<a href='approve.php?ref=" . $array['id'] . "'>Your '" . $array['keywords'] . "' article has been written and needs to be reviewed.</a>";
//echo "<br />";
} while($array = mysql_fetch_array($result)) //While there are still rows in the SELECT query.
}
Ideas? I must be blind. Thank you!
} while($array = mysql_fetch_array($result))Should be
} while($array = mysql_fetch_array($result));do-while
By the way, that snippet of code looks like it should probably be using a
whileloop, unless you’re purposely using an old value of$arraythe first time through.