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

From: Date: Wed, 14 Mar 2001 23:54:45 +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-43927@lists.php.net to get a copy of this message
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/ >

« previous php.general (#43927) next »