Re: Expand/parse variables in file
| From: | Richard Lynch | Date: | Wed, 27 Jun 2001 05:56:52 +0000 |
| Subject: | Re: Expand/parse variables in file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-55330@lists.php.net to get a copy of this message | ||
$b = 'abc $a def';
$a = 'whatever';
Actually, what I think you'll end up with needing is more like:
eval("$c = \"$b\"");
You can't just eval($b) because that would be like typing:
<?php
abc $a def
?>
You need something roughly equivalent to:
<?php
$c = "abc $a def";
?>
http://php.net/eval
--
WARNING richard@zend.com address is an endangered species -- Use
ceo@l-i-e.com
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm