string strstr ( string haystack, string needle )
string strstr ( string haystack, string needle ) returns part of haystack string from the first
occurrence of needle to the end of haystack
$email = 'programmerinphp@gmail.com';
$domain = strstr($email, '@');
echo $domain; // prints @gmail.com
?>
This function is case-sensitive
STRISTR is same as STRSTR but it is case insensitive
No comments:
Post a Comment