PHP: Parse Error: unexpected T_DOUBLE_ARROW
My code gives me the error
Parse error: syntax error, unexpected T_DOUBLE_ARROW, expecting ')' line 208
I keep getting this but it looks correct? Line 208 which is the second down.
array( "name" => "Colour Scheme",
"desc" => "Select the colour scheme for the theme",
"id" => $shortname."_color_scheme",
"type" => "select",
"options" => array("blue", "red", "green"),
"std" => 开发者_开发知识库"blue"),
please advise!
Thanks
T_DOUBLE_ARROW
is the token for =>
, so you have one which appears somewhere the parser doesn't expect it.
Besides that trailing ,
, there is no error with the code you posted.
Besides that trailing ,, there is no error with the code you posted. -- alex
Often errors can come up on a line, when the problem is actually right before it (for example missing ; at line end) -- Jonah
My bet is that Jonah is correct and that the error in the line above this array. From the context of the trailing ,
I bet this is a mutli-dimensional array.
If you include the code around your array I bet the problem is the line above.
Good luck.
精彩评论