FANDOM


Finds the last occurrence of a case-insensitive string inside a string.

Arguments Edit

void strripos ({{{params}}})


Argument Inclusion Edit

  • strripos needs PHP version 5 to work.

Return values Edit

strripos will return the numeric position of the last case-insensitive search string inside the given string. Note that the position in string starts with 0 and not with 1. If the optional offset parameter was set it starts searching at the character with that number. The return value will still be relative to the beginning of the string.

Examples Edit

Example 1: The direct way Edit

<?php
 echo strripos("Find a string inside a StrING", "string");
?>

Output2 Edit

Example 2: Using a variable and offset Edit

<?php
 $string = "abc cde fgh ijkl m n";
 $find   = "fgh";
 echo strripos($string, $find, 2); // Stars searching at the first b
?>

Output Edit

8
For more details on this function, visit its entry in the php manual.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.