On Fri, 23 Nov 2001 14:10, Joseph Blythe wrote:
> Hello,
> Is there a way to strip only php code out of an html file? I know about
> strip_tags but its going to be alot of work to make the allowable list,
> as all I want to strip out is:
> <?php ... ?>
> I tried like so:
> eregi_replace ("<?php include(\"whatever.php\"); ?>", "", $string);
> but it didn't find it suppose because of the escape characters...
> Another option would be to find the php code evaluate it and then put
> the result back in the correct position, I sort of tried this with not
> much luck.
> Any ideas..
> Regards,
> Joseph

It sounds like you want to capture the output of the script - so you just 
end up with what you would see in View Source???

Is this a one off thing, or what exactly is the problem you are trying to 

David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc

   Always draw your curves, then plot the data.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to