Re: Executing a string with both html and php inside it..
| From: | Aviv Revach | Date: | Wed, 14 Mar 2001 11:50:41 +0000 |
| Subject: | Re: Executing a string with both html and php inside it.. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-44011@lists.php.net to get a copy of this message | ||
Hey!
The function 'eval()' can't be used here.
I already tried working with it and failed.
eval() is being used for running PHP code.
My string contains HTML tags with PHP code inside(in '<?php' and '?>' tags),
not only PHP as eval() requires.
Do you have any other suggestion?
Thank you in advance -
Aviv Revach
At 18:54 14/03/01 -0500, Andrew Hill wrote:
Aviv, eval() http://www.php.net/manual/en/function.eval.php Best regards, Andrew
On 3/13/01 6:35 PM, "Aviv Revach" <aviv_r@brillianet.com> wrote: Hey! What should I do in order to execute the next string: $str = "<html>\n" $str .= "blabla\n"; $str .= " <?php echo \"hello!\"; ?>\n"; $str .= "blabla\n"; $str .= "</html>\n"; When I tried using 'echo' with the string, but the php code didn't work... Is there any way of doing this without writing this string to a file and include'ing it? (that would be rather slow!) Thank you in advance - Aviv Revach BRILLIANeT Website - http://www.brillianet.com/
BRILLIANeT Website -http://www.brillianet.com/