strpos function to check character in string using php
suppose i would like to find : in string so chk this out
$username = ’mrphpguru:aphp coder’;
$pos = strpos($username, ”!”);
if ($pos == -1)
{
print Please ‘don’t put : in your usernames’;
}
else
{
print ’No special character in the string.Thanks’;
}
So using strpos function we can find a character in a string using php function strpos.
thanks
mrphpguru






