Thread: Block PHP Tag
View Single Post
  #6 (permalink)  
Old Feb 13th, 2008, 23:12
RohanShenoy RohanShenoy is offline
Reputable Member
Join Date: Nov 2007
Location: India
Posts: 150
Blog Entries: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Block PHP Tag

If you want, you may use regular expressions.
PHP: Select all

<?php
$string
="967<php?PHPknn";
if((
ereg('^[^.]+<[?][^.]+$',$string)) || (ereg('^<[?][^.]+$',$string)))
{echo 
"TAG FOUND";}else{echo "TAG NOT FOUND";}
?>
I have written a more exhaustive tutorial at http://www.w3hobbyist.com/index.php?...field-PHP.html

Last edited by RohanShenoy; Feb 14th, 2008 at 05:35.
Reply With Quote