Re: Executing a string with both html and php inside it..

From: Date: Thu, 15 Mar 2001 12:26:29 +0000
Subject: Re: Executing a string with both html and php inside it..
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-44013@lists.php.net to get a copy of this message
On Wednesday 14 March 2001 12:50, you wrote: > 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? AFAIK there's no other way than using include(). Why do you need that anyway? > > > 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... -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Pretty cool, the kind of power information technology puts in our hands these days. - Securityfocus on probing 36000000 hosts for known problems in 3 weeks

« previous php.general (#44013) next »