Check String Contain Specific words - PHP
The following code is used to find the specific words or char from a string by using php.
here "strpos()" is used. This function is used to get string position from the original string. here i just get true or false result if the original string contains the specific word or character,
if (strpos($a,'are') !== false)
{
echo 'true';
}
else
{
echo 'false';
}
0 comments:
Post a Comment