PHP strripos () function
Examples
Find "php" position in the string of the last occurrence:
<?php
echo strripos("I love php, I love php too!","PHP");
?>
echo strripos("I love php, I love php too!","PHP");
?>
Running instance »
Definition and Usage
strripos () function to find the position of a string in another string of the last occurrence (case insensitive).
Note: strripos () function is not case-sensitive.
Related functions:
- stripos () - Find the position of a string in another string of the first occurrence (case insensitive)
- strpos () - Find the string in another string of the first occurrence (case-sensitive)
- strrpos () - Find the string in another string of the last occurrence (case-sensitive)
grammar
strripos( string,find,start )
参数 | 描述 |
---|---|
string | 必需。规定被搜索的字符串。 |
find | 必需。规定要查找的字符。 |
start | 可选。规定开始搜索的位置。 |
technical details
return value: | Returns the string in another string of the last occurrence of the string if not found returns FALSE. Note: The position of the string starting from 0, not 1. |
---|---|
PHP version: | 5+ |
Update log: | Since PHP 5.0 onwards, find more than one parameter can be a character string. In PHP 5.0, add the start parameters. |
PHP String Reference