On Wed, 1 Sep 2004 08:22:14 -0700
"Sara Golemon" <[EMAIL PROTECTED]> wrote:

> > Just use double quotes, no need for a function:
> >
> >   $string = "* {$abc} * {$klm['klm']} * {$xyz->xyz} *";
> >   echo $string;
> >
> He wants to store an UNinterpolated string somewhere (like a DB or
> text file), then interpolate it at run-time.
> 
> $sitename = 'php.net';
> $username = 'pollita';
> $string = $db->getOne('SELECT somestring FROM thetable WHERE
> id=\'foo\'');/* $string now contains something like:  'Welcome to
> {$sitename}. You are logged in as {$username}'
>  * He wants $string to get interpolated into:  'Welcome to php.net. 
>  You are
> logged in as pollita'
>  */
> 
> I've thought this would be a nice thing to have as well, but it's not
> something that can be trivially ripped out of the compiler and I
> havn't personally had the motivation to actually get it done.

I'd propose to the author to look at some template engine 
(I'm sure almost all of them already have this functionality implemented).

-- 
Wbr, 
Antony Dovgal aka tony2001
[EMAIL PROTECTED] || [EMAIL PROTECTED]

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to