Jump to content

[SOLVED] Unexpected {


lokie538

Recommended Posts

Hi,

 

Im getting an Parse error: syntax error, unexpected '}' in

 

        <?php $x = "1";
	while ($x < "11") {
	$filename = "Gallery/workshop/" . $x . ".jpg";

		if (file_exists($filename)) {
			echo "<img src=\"Gallery/contest/" . $id . ".jpg\" alt=\"Contest Picture\" /><br />";
		}

	$x = ($x + 1)
	} // Error points to this line

	?>

 

Ive never used a while loop before so what am I doing wrong?

Link to comment
https://forums.phpfreaks.com/topic/144568-solved-unexpected/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.