First look at the following function:
String processing function library Strpos Searches for the first occurrence of a character in a string. Syntax: Int strpos (string haystack, string needle, int [offset]); Return Value:Integer Function types:Data Processing
This function is used to find the first position where the character needle in the haystack string appears. It is worth noting that the needle can only be one character, and it is not suitable for Chinese characters. If the specified character is not found, false is returned. The offset parameter can be omitted, which is used to start searching from offset.
Strrpos () strrchr () substr () Strstr () |
If the returned location exists, false is returned if the returned location does not exist. Therefore, this can be determined: $ is_exist = is_int (strpos ('Hello the world! ', 'Hello ));
First look at the following function:
String processing function library Strpos Searches for the first occurrence of a character in a string. Syntax: Int strpos (string haystack, string needle, int [offset]); Return Value:Integer Function types:Data Processing
This function is used to find the first position where the character needle in the haystack string appears. It is worth noting that the needle can only be one character, and it is not suitable for Chinese characters. If the specified character is not found, false is returned. The offset parameter can be omitted, which is used to start searching from offset.
Strrpos () strrchr () substr () Strstr () |
If the returned location exists, false is returned if the returned location does not exist. Therefore, this can be determined: $ is_exist = is_int (strpos ('Hello the world! ', 'Hello ));