note 21976 deleted from function.eval by nlopess
| From: | nlopess@php.net | Date: | Tue, 18 May 2004 13:38:49 +0000 |
| Subject: | note 21976 deleted from function.eval by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-69766@lists.php.net to get a copy of this message | ||
Note Submitter: pascal.thomas@_nospam_inlive.info
----
if u have string $s to "translate", coming from a file or database, and u required to
email it, use this code:
ob_start();
eval("echo \"".addslashes($s)."\";");
$s= ob_get_contents();
ob_end_clean ();
$s=stripslashes($s);
the orginal content of $s should look like this:
hello <b>$GLOBALS['username']</b>
the code produce:
hello <b>Akuma</b>
take care if u put this merge code in a function, eval use same data accessibility as
..."print" function for example.
Read details and comments about ob_xxx, very interesting.