Subscribe For Free Updates!

We'll not spam mate! We promise.

May 9, 2013

Check String Contain Specific words - PHP



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';
}

TechniqZone Socializer Widget
SOCIALIZE IT →
FOLLOW US →
SHARE IT →

0 comments:

Post a Comment