Implement PHP within a string
| From: | Joshua E Minnie | Date: | Thu, 25 Jul 2002 18:54:21 +0000 |
| Subject: | Implement PHP within a string | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-109571@lists.php.net to get a copy of this message | ||
Is it possible to run PHP that is embedded within a string? I have a file
that is read into a string and returned to the browser, how can I run that
PHP?
i.e.
<?
function something() {
// this is set earlier by other functions
// $str = "<html><body>some html code<? $this->getForm("guest");
?>some more
html code</body></html>";
return ($str);
}
echo $obj->something();
--
Joshua E Minnie/CIO
josh@acsurf.net
Phone: 616.276.9690
Fax: 616.342.8750
Nextel: 616.862.2847
"Don't work for recognition, but always do work worthy of recognition."