| Posted by Jon Slaughter on 04/28/07 22:11 
"Janwillem Borleffs" <jw@jwscripts.com> wrote in message news:4633bec1$0$31213$dbd43001@news.euronet.nl...
 > Jon Slaughter wrote:
 >> Is there any command that essentially executes the code and then
 >> echo's it?
 >
 > For this specific case you could use eval:
 >
 > $code = "?><body>blah<?php echo 'Hello'; ?></body>";
 > eval($code);
 >
 > Note that the closing tag at the beginning of the eval string is
 > mandatory.
 >
 >
 
 Ok. Thats not the specific case I need but maybe it will still work? It is
 essentially what I have. That is, I have an html file with some php code in
 it similar to the example but just more complex. (actually right now its
 just plain html but when I want to add some php stuff I'll need to be able
 to have it evaluated).
 
 Thanks,
 Jon
  Navigation: [Reply to this message] |