[EMAIL PROTECTED] wrote:
Hi, is there a function that can parse variables within a string?
For example:
$good_day = 'The';
$fr['iop'] = "y're crazy!";
$new = '$good_day$fr['iop']';
echo TheFunctionIRequest($new); // They're crazy!
Thanks!
One thing to add to what everybody else is saying, is that you should use curly braces around your
variable names. This way the parser will not get confused.
$new = "{$good_day}{$fr['iop']}";
It just helps the parser recognize the beginning and ending of your variables.
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php