views:

59

answers:

3

code image.

Hi, this is my code, don't know why but I have a stupid syntax error,on the marked line. Please bring some light for a php nob.

Parse error: syntax error, unexpected ')', expecting ';' in /var/www/stats/upd_tr_stats.php  on line 38
+10  A: 

You need to use a while loop instead of a for.

Tom Haigh
@Tom - I think that's a slam dunk. Good show, sir!
karim79
+1 Agree with Tom
falomir
+1 because that's probably what he wants
Ikke
Thanks Tom and everybody else. I got a wrong example from google.
Claudiu
+2  A: 

This is not a foreach statement, but a for statement. That's why it is expecting a ;

But you are still missing a part.

Ikke
+3  A: 

in php.net

for (expr1; expr2; expr3)
statement

so, your for function doesn't have three expression.

davit