English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP String Manual of String Functions
The stripos() function is used to find the first occurrence position of a string (not case-sensitive).
stripos(string,find,start)
It is used to find the first occurrence position of a string in another string
Related Functions:
strripos() - Find the last occurrence position of the string in another string (not case-sensitive)
strpos() - Find the first occurrence position of the string in another string (case-sensitive)
strrpos() - Find the last occurrence position of the string in another string (case-sensitive)
Returns the position of the first occurrence of a string in another string. If the string is not found, it returns FALSE. Note: The string position starts from 0, not from 1 Start.
Serial Number | Parameters and Description |
---|---|
1 | string Used for string search |
2 | find Used to specify the string to be searched |
3 | start It specifies where to start the search |
Try the following example, search for 'w'3The first occurrence position of 'codebox' in the string
<?php //Search for the string 'w'3The first occurrence position of 'codebox' echo stripos("www.oldtoolbag.com","w3codebox"); ?>Test and see‹/›
Output Result
4