Error with array and include

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm having a strange problem when trying to show a array after its value was defined on a file that was included. Something like this:

<?php
   $lang = 'pt_BR';

   include('lang/'. $lang .'/login.php');

   echo $lang['Username'];
?>

On the file lang/pt_BR/login.php i have this...

<?php
   $lang['Username'] = 'Usuário';
?>

But the result of the first script is 'S' (without quotes).

If i change lang/pt_BR/login.php to

<?php
   $lang['Username'] = 'Usuário';

   echo $lang['Username'];
?>

I get 'Usuário' (without quotes again).

Why does this happens?

Thanks,

Fernando.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux