For loop error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ljCharlie
Forum Contributor
Posts: 289
Joined: Wed May 19, 2004 8:23 am

For loop error

Post by ljCharlie »

Can anyone tell me what's wrong with the following for loop?

Code: Select all

for($numOfCells=1; $numOfCells<=$totalRows_rsArchived; $numOfCells++){

}
The error I got is:

Parse error: parse error, expecting `','' or `';'' in /www/home/mySite/myPhotoGallery.php on line 206

Line 206 refers to the for loop above.

Any help is grateful!

ljCharlie
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Have a read: viewtopic.php?t=21171

And post a bit more of the code. An error can be said to occur on a line, while it actually occurs elsewhere.
ljCharlie
Forum Contributor
Posts: 289
Joined: Wed May 19, 2004 8:23 am

Post by ljCharlie »

Thanks! I got it fixed. I forgot one semi-colon on a line that's above that line. It was pointing me to the wrong that is why.

ljCharlie
Post Reply