Definition and usage
The stripos () function returns the position where the string first appears in another string.
If this string is not found, false is returned.
Syntax
Stripos (string, find, start)
Parameters |
Description |
String |
Required. Specifies the string to be searched. |
Find |
Required. Specifies the characters to be searched. |
Start |
Optional. Specifies the location where the search starts. |
Tips and comments
Note: This function is case insensitive. To perform a case-sensitive search, use the strpos () function.
This function returns the position of the first occurrence of the string in another string. So this location may be 0.
When the return value is 0, you must note that
Copy codeThe Code is as follows:
If (stripos ($ r, 'A') = false ){
// 0 indicates that a exists in total with $ r, but because 0 and false are equal, the following code is executed:
}
If (stripos ($ r, 'A') == false ){
// In this case, we must use all equal values.
}