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? 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); 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!! 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 ;-) Link to comment https://forums.phpfreaks.com/topic/144568-solved-unexpected/#findComment-758651 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.