Page 1 of 1

Defines...

Posted: Mon Oct 11, 2004 9:47 pm
by dreamline
Hi guyz,
I'm running into a little problem with defines.. Here's the thing i'm wondering about. I'm building a multiple language site and all my languages are in seperate files with defines. So the basic define is printed like this:
echo(DEFINEDFIELD);

Now is there a way to set a string like $var='DEFINEFIELD'; and then print the $var so that actually the text from the DEFINEFIELD is printed?

Example:
language1.php -> DEFINE("ERROR1","There was an error");
language2.php -> DEFINE("ERROR1","Er is een fout");
$var='ERROR1';
echo(???)

Is there a way to echo $var so that actually the correct language from the define is printed?

Hope this makes sense?

Thanks for any help.... :D


Never mind.. I think i got it... :D

For those who don't know yet:

echo(constant($var)); would do the trick... :D