This is very strange... I've been pounding my head on this for a while.
I'm working on some php code that was written by someone else who likes to use a '#' to denote a comment. Emacs, for some reason, doesn't like the '#' and does not indent properly when it is used to denote comments. Because of that, I went through and replaced all the '#' with "//" and tested that the code still worked... it did. So then I selected the entire file (1600 lines or so) and used the indent-region function in emacs to make the code more easily readable... now I get a parse error, and a strange one at that:
Parse error: parse error, unexpected ']', expecting T_STRING or T_VARIABLE or T_NUM_STRING
It's refering to the bold line:
Code:
while ($line = mysql_fetch_array($result, MYSQL_NUM)) {
$order_array[] = $line[0];
}
Because I was getting frustrated, I just commented out that line to see if it would work, but I still get the same error on the same line - even if the line is a comment! If I change the code so that it does not have any square brackets, the same error comes up on the next square bracket in the file.
What gives?