Page 1 of 1

Variable Problem

Posted: Wed Aug 06, 2003 2:10 am
by Telos
I have some problems with variables. I have a class and then I have a language.php file and I include the class file and the language file in index.php file. Now I have this in language file:

Code: Select all

$lang_time = 'Time';
and when I try to echo the $lang_time variable in the index file it works ok and I get "Time" as a result but when I try to echo it inside one of the class's functions I don't get nothing. How can I make it like it would work there too?

Posted: Wed Aug 06, 2003 2:22 am
by Telos
ok, I found one solution. I just changed the variables in language.php file into this

Code: Select all

define(lang_time, 'Time');
and that works ok. Just would like to know if that's a good idea or what?