Current Location: Home> Function Categories> strripos

strripos

Calculate the last occurrence of the specified string in the target string (case insensitive)
Name:strripos
Category:String
Programming Language:php
One-line Description:Finds where the string last appears in another string (case insensitive).

Definition and usage

strripos() function finds where the string last appears in another string.

Note: strripos() function is case-sensitive.

Related functions:

  • stripos() - Find where the string first appears in another string (case insensitive)
  • strpos() - Find where the string first appears in another string (case sensitive)
  • strrpos() - Find the last occurrence of a string in another string (case sensitive)

Example

Find the last occurrence of "php" in the string:

 <?php
echo strripos ( "You love php, I love php too!" , "PHP" ) ;
?>

Try it yourself

grammar

 strripos ( string , find , start )
parameter describe
string Required. Specifies the string being searched.
Find Required. Specifies the characters to be searched.
start Optional. Specify where to start the search.
Similar Functions
Popular Articles