New function request - Variable parsing a string
| From: | Herbert Groot Jebbink | Date: | Tue, 31 Aug 2004 17:38:13 +0000 |
| Subject: | New function request - Variable parsing a string | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-12509@lists.php.net to get a copy of this message | ||
Hi,
To speed up a homebuild PHP framework I would like to have a new
function that expands a string with the PHP variables in it, just like
how variable parsing is done for a double-quotes string.
string VariableParsingString ( string string )
Currently I do it with the next eval statement.
eval('$result = "' . str_replace('"', '\\"', $string) .
'";');
Greetings, Herbert