Expecting comma or semicolon

From Php

Jump to: navigation, search

The error expecting ',' or ';' probably means just that -- that you're missing a comma or semicolon. Usually this means that there should be a semicolon at the end of the line. For example:

WRONG

 i = 1;
 j = 2    // wrong!

RIGHT

 i = 1;
 j = 2;   // right!

Note, however, that sometimes the compiler will yell at you saying you need a semicolon when the actual problem is that other code is in the wrong place. @@@ show example

Personal tools