i have found this code on the net : $check = substr_count($string, '@'); --------------------------------------------------- If $check is not 0 then $string contains the character. How do i check for other characters in just some lines of script?
Look into these functions.. strpos() preg_match() In your case I would be definitely suggest using preg_match().
how..? can someone make one for me.. I only know to check it one by one... is there a way to make it in just a few lines? sample : $str = "abcdefghijklmnop*%$@&#&*"; echo strpos($str, '%'); // outputs 1 what if i want to check a series of character *&*$.. how do i do it in just a few lines?