Handling of constants in strings
| From: | Uwe Birkenhain | Date: | Mon, 01 Jul 2002 15:48:55 +0000 |
| Subject: | Handling of constants in strings | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-104696@lists.php.net to get a copy of this message | ||
Hi,
when reading about constants (define('MY_CONSTANT', 'my value'))
I got convinced that they are pretty usefull.
But now it seems to me, that I can't use them inside a string:
$my_string = "This is MY_CONSTANT and I love it!";
but that I must take them out:
$my_string = "This is" . MY_CONSTANT . "and I love it!";
Isn't there a way around?
And must I suspect more strange things to come with constants?
greetings,
Uwe