$new = '$good_day$fr['iop']';

This will give you error...
Instead if you try in this way as follows
$new = "$good_day$fr['iop']"; or
$new = $good_day.$fr['iop'];

It will include the "They're carzy!" in the $new variable..


Warm Regards,
Sanjeev
http://www.sanchanworld.com/
http://webdirectory.sanchanworld.com - Submit your website URL
http://webhosting.sanchanworld.com - Choose your best web hosting plan

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 15, 2007 12:21 PM
To: php-general@lists.php.net
Subject: [PHP] Parsing Variables Inside a String

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!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to