I hit a strange problem with PHP and its require_once
language construct.
I require file called EN-en.php
. It contains the English language for my website, I wrote it like this:
....
$lang['header']['loginbox']['menu'][1] = "contacts" ;
$lang['header']['loginbox']['menu'][2] = "settings" ;
....
Then I user this code to include my file in the whole site
require_once $langFile ;
Very easy I think, $langFile is = "/var/www/webstite/langs/EN-en.php"
. But here's come the strange part.
When I use
echo $lang['header']['loginbox']['menu'][1];
It prints something like "Gontacts" ... I can't understand why, and it's not the only case.. Please someone can help me with this issue?.