game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online

strpos function to check character in string using php

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

how to chk a character in a string using php

Hi here i am writing a function to chk whether a character in string exist or not 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