lokie538 Posted February 10, 2009 Share Posted February 10, 2009 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? Quote Link to comment https://forums.phpfreaks.com/topic/144568-solved-unexpected/ Share on other sites More sharing options...
drisate Posted February 10, 2009 Share Posted February 10, 2009 You forgot a ; $x = ($x + 1); Quote Link to comment https://forums.phpfreaks.com/topic/144568-solved-unexpected/#findComment-758648 Share on other sites More sharing options...
lokie538 Posted February 10, 2009 Author Share Posted February 10, 2009 Damn it I always make simple mistakes and can never see them myself lol Thanks drisate!! Quote Link to comment https://forums.phpfreaks.com/topic/144568-solved-unexpected/#findComment-758649 Share on other sites More sharing options...
drisate Posted February 10, 2009 Share Posted February 10, 2009 np bro ;-) Quote Link to comment https://forums.phpfreaks.com/topic/144568-solved-unexpected/#findComment-758651 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.