So you want to remove only the unparsed/raw php script blocks.

Why... are you displaying PHP without parsing??

If this is the case you can write a couple of very simple preg_replace
with a call
back and all is done.



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

> -----Original Message-----
> From: David D [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, 6 January 2003 10:48 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] strip php tags from code ?
> 
> 
> I only want to keep html code of a page.
> I want to remove php tags.
> Some tell that strip_tags is not adapted.
> 
> sample of what i want to do:
> <html>
> na
> <?php echo 'na';?>
> </html>
> ->
> <html>
> na
> </html>
> 
> php tags can be :
> <? ?>or <?= ?>
> or <script language='php'></script>  /i
> 
> Merci.
> 
> 
> 
> ..
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to