This article mainly introduces PHP to judge the string in another string position method, need friends can refer to the nextThe code is as follows: $email = ' firstname.lastname@example.org '; Defines a string $result =strstr ($email, ' @ '); Returns the substring echo $result; The Strstr () function searches for a string that appears for the first time in another string. The function returns the remainder of the string (from a match point). returns false if the searched string is not found. The syntax code is as follows: Strstr (String,search) Outputs the result "@exe. com"