Re: Error with array and include

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

 



On Tue, December 5, 2006 9:11 am, Fernando M. M. wrote:
> 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'];

You are using $lang for BOTH the language to include, and then again
as an array for content within that language.

Don't do that.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
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