Copy code The code is as follows:
$email='user@exe.com'; //Define string
$result=strstr($email,'@'); //Return substring
echo $result;
The strstr() function searches for the first occurrence of a string in another string.
This function returns the rest of the string (from the matching point). Returns false if the searched string is not found.
Syntax
Copy code The code is as follows:
strstr(string,search)
Output result "@exe.com"
http://www.bkjia.com/PHPjc/736843.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/736843.htmlTechArticleCopy the code as follows: $email='user@exe.com'; //Define string $result= strstr($email,'@'); //Return substring echo $result; The strstr() function searches a string within another character...