Current Location: Home> Function Categories> stripos

stripos

Find the location where the string first appears (case insensitive)
Name:stripos
Category:String
Programming Language:php
One-line Description:Returns where the string first appears in another string (case insensitive).

Definition and usage

stripos() function finds where the string first appears in another string (case insensitive).

Note: The stripos() function is case-insensitive.

Note: This function is binary safe.

Related functions:

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

Example

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

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

Try it yourself

grammar

 stripos ( string , find , start )
parameter describe
string Required. Specifies the string to search.
Find Required. Specifies the characters to be searched.
start Optional. Specify the location to start the search.
Similar Functions
  • Write formatted strings to stream vfprintf

    vfprintf

    Writeformattedstring
  • Get the length of the starting substring that does not match the mask strcspn

    strcspn

    Getthelengthofthesta
  • Insert HTML newline tag before all new lines of a string nl2br

    nl2br

    InsertHTMLnewlinetag
  • Alias ​​of implode join

    join

    Alias​​ofimplode
  • Break string to a specified number of strings wordwrap

    wordwrap

    Breakstringtoaspecif
  • Determines whether a string contains a given substring str_contains

    str_contains

    Determineswhetherast
  • Calculate the soundex key of a string soundex

    soundex

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

    ord

    Convertthefirstbyteo
Popular Articles