note 48495 deleted from ref.strings by tomsommer
| From: | tomsommer@php.net | Date: | Sun, 26 Dec 2004 21:06:50 +0000 |
| Subject: | note 48495 deleted from ref.strings by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-82328@lists.php.net to get a copy of this message | ||
Note Submitter: PHP at ImmortalSoFar dot com
----
You can expand variables in a string variable as if it were double quoted using the eval ()
function.
$format='Name of $row[\'ID\'] is $row[\'Name\']';
$row=sql_fetch_array ($result);
echo (eval ("return \"$format\";"));
// returns Name of record_id is record_name