Syntax error, unexpected bracket

The message syntax error, unexpected '['  can mean that you forgot the "$" on your array variable, so that the compiler couldn't figure out that it was a variable.

WRONG foo[5] = 7;  // missing $

RIGHT $foo[5] = 7;