Parse error: syntax error, unexpected ','


#1

Um, this is really weird I didn’t touch a file and this happened:
Parse error: syntax error, unexpected ‘,’
This is the line it’s talking about:
a=>"?",b=>"?",c=>"?,d=>"?",e=>"?,f=>"?",g=>"?",h=>"%",i=>"?",j=>"?",k=>"?",l=>"?,m=>"?",n=>"?,o=>"!",p=>"?",

What I don’t understand is why even after restore it still gives that error.
Any advice?


#2

is the line terminated with a semi-colon?


#3

It’s part of an array


#4

but the line still needs to be terminated with a semi-colon. (by line I mean command, etc…) All commands need to be terminated properly. If your lines are ending with a comma instead of the semi-colon, you would get an error similar to what you got.


#5

This is what I see when I start linebreaking on all commas:

a=>"?",
b=>"?",
c=>"?,
d=>"?",
e=>"?,
f=>"?",
g=>"?",
h=>"%",
i=>"?",
j=>"?",
k=>"?",
l=>"?,
m=>"?",
n=>"?,
o=>"!",
p=>"?",

And that’s where the problem becomes clear: half of the values only have one double-quote :) Syntax errors are pretty common when that happens.