i don't understand, when i create an array in my file.php, it's not working. I have only this code in my page:
$organization = array(
'name' => '- offre',
);
var_dump($organization)
and it made me an error 500. I made phpinfo() to see my php version and i have PHP Version 5.3.3-7+squeeze3 Do you have an idea where this error come from ? when i declare variable it works but it can't read only array. I have made a script without array it works but when i am using arrays i get error 500.
just delete the comma
$organization = array(
'name' => '- offre'
);
add semicolon after var_dump
var_dump($organization);
Internal Error 500
The server encountered an unexpected condition which prevented it from fulfilling the request.
Solution:
In PHP each and every statement end with a semicolon ;
, and in your code you miss it, so the problems comes out. So use the ;
after the var_dump
. Remove white spaces from the array.
Check online, Mush check it.
$organization = array(
'name' => '- offre',
);
var_dump($organization);
Note: Without the
;
you will be notifiedParse error: syntax error, unexpected end of file ... At line ..