php strrpos() function


  Translation results:

英[strɪŋ] 美[strɪŋ]

n.String; rope, belt; thread, plant fiber; [Computer Science] String

vt. Winding, tuning; To line up in a line or a series; to tie, tie or hang with a thread; to extend or extend

Third person singular: strings Plural: strings Present participle: stringing Past tense: strung Past participle: strung

php strrpos() functionsyntax

Function: Find the last position of a character in a string

Syntax: strrpos(string,find,start)

Parameters:

ParametersDescription
string Required. Specifies the string to be searched for.
findRequired. Specifies the characters to search for.
startOptional. Specifies where to start the search.

Description: Find the last occurrence of a string in another string. The strrpos() function is case-sensitive.

php strrpos() functionexample

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

Run instance»

Click the "Run instance" button to view the online instance

Output:

21


<?php
var_dump(strrpos("You love php, I love php too!","PHP")) ;
?>

Run Instance»

Click the "Run Instance" button to view the online instance

Output:

bool(false)

Home

Videos

Q&A