note 56460 added to function.eval
| From: | sadi at unicornsoftbd dot com | Date: | Sat, 03 Sep 2005 13:49:17 +0000 |
| Subject: | note 56460 added to function.eval | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-94690@lists.php.net to get a copy of this message | ||
I m going to give you my recent exploration about eval. I think you dont need all those complex
functions using regex to work HTML in your code. when ever you call eval(), php thinks that it is
within <? ?> tags. so all the problem rises. to solve the problem just close your php tag at
first of the HTML string, then write the HTML string and then start the php tag.
this is some thing like:
<?php
$teststr="?><html><body>this is the
test</body></html><?php";
eval($teststr);
?>
i think this will work for you. at least this worked for me. if you find any problem with this
please reply
----
Manual Page -- http://www.php.net/manual/en/function.eval.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56460
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56460&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56460&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56460&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56460&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56460&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56460&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56460&report=yes
Search -- http://master.php.net/manage/user-notes.php