Re: is there anyway to use constants in a string?
| From: | barophobia | Date: | Mon, 19 Jul 2004 19:05:40 +0000 |
| Subject: | Re: is there anyway to use constants in a string? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-191057@lists.php.net to get a copy of this message | ||
On Mon, 19 Jul 2004 11:48:02 -0700, Justin Patrin <papercrane@gmail.com> wrote:
> On Mon, 19 Jul 2004 10:22:42 -0700, barophobia <barophobia@gmail.com> wrote:
> > $my_string = <<<QQQ
> >
> > MY_CONSTANT: does not work for obvious reasons
> > {MY_CONSTANT}: does not work for obvious reasons
> > {$MY_CONSTANT}: does not work for obvious reasons
> >
> > QQQ;
> $my_string = 'pre'.MY_CONSTANT.'post';
yeah but did you notice in my example i'm using a heredoc? i did that
on purpose. :)
chris.