Hello,
In a submitted form I need to check if an input field contains plain text or HTML text.
I've declared an array with the tags I look for :
$html_tags=array(0=>"<span",1=>"<br",2=>"<table",3=>"<p",4=>"<br");
Then I call the following function :
function html_tags($mystring) {
global $html_tags;
$not_found=0;
while (list($key,$val)=each($html_tags)&&($found==0)) {
if (strpos($mystring, $val)!=0):
$found=1;
endif;
}
return $found;
};
It doesn't work because my array contains a '<' character.
Any idea ?
Jean Pierre PICHON