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
  • Calculate the sha1 hash value of the file sha1_file

    sha1_file

    Calculatethesha1hash
  • Convert the first byte of the string to a value between 0-255 ord

    ord

    Convertthefirstbyteo
  • Find the last occurrence of a specified character in a string strrchr

    strrchr

    Findthelastoccurrenc
  • Return part of the string substr

    substr

    Returnpartofthestrin
  • Output formatted string printf

    printf

    Outputformattedstrin
  • Escape metacharacter set quotemeta

    quotemeta

    Escapemetacharacters
  • Find the first occurrence of a string strstr

    strstr

    Findthefirstoccurren
  • Substring replacement str_replace

    str_replace

    Substringreplacement
Popular Articles