Page 1 of 1

define() use in strings

Posted: Fri Dec 15, 2006 12:47 pm
by blueherring
I'd like to define values that are expanded inside strings, for example:

define("EXPAND_THIS","Expanded Stuff");

echo(" Here comes the stuff EXPAND_THIS");

Is there any way to do this?

Thanks

BH

Re: define() use in strings

Posted: Fri Dec 15, 2006 1:04 pm
by Kieran Huggins
You could remove it from the quotes:

Code: Select all

define("EXPAND_THIS","Expanded Stuff");

echo(" Here comes the stuff ".EXPAND_THIS);
Cheers,
Kieran

Posted: Fri Dec 15, 2006 2:41 pm
by RobertGonzalez