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...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn