PDA

View Full Version : Help with echo-ing arrays


owner
10-07-2007, 05:14 PM
Hello,

I have made a language file with an array in it holding all my languages.

example: 'lang_brown' => 'brown'

now, when I go to echo it, I use

echo $lang_global['lang_brown'];

Is their a way where instead of using all that code I could just go

{$lang_global['lang_brown']}

My IPB software that I have (www.invisionpower.com (http://www.invisionpower.com))
All you have to do is type in {$this->ipsclass->lang['blank_fields_email']} and it automatically replaces that with the word from one of the 25 language files that they have.

Note: I see they are calling one of their oop functions their, but their code is very hard to understand it as their is so much!

Thanks in advance!
Owner

davidj
10-07-2007, 09:02 PM
you have to tell php to echo the result

you can build a function which echos it for you and then just call the function where you want it displayed