Strip PHP tags

From: Date: Mon, 12 Aug 2002 17:35:54 +0000
Subject: Strip PHP tags
Groups: php.general 
Request: Send a blank email to php-general+get-112180@lists.php.net to get a copy of this message
Hi all, Is there an easy way to remove <?php...?> tag from a string ? Ive got this script and i want it to output only html... I know i can do this with regular expression but i wonder if there are some native function to do the job. <?php $out = implode("\n", file ($_SERVER['PATH_TRANSLATED'])); echo function_to_remove_php_tags($out); exit(); ?> <html> <head> <title>Test</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> Hello !!! </body> </html> Regards ! Rémy Dufour

« previous php.general (#112180) next »