strrposPodręcznik PHPPoprzedniNastępnystrrpos (PHP 3, PHP 4 )strrpos --
Find position of last occurrence of a char in a string
Descriptionint strrpos ( string haystack, char needle)
Returns the numeric position of the last occurrence of
needle in the
haystack string. Note that the needle in
this case can only be a single character. If a string is passed
as the needle, then only the first character of that string will
be used.
If needle is not found, returns FALSE.
Notatka:
It is easy to mistake the return values for "character found at
position 0" and "character not found". Here's how to detect
the difference:
// in PHP 4.0b3 and newer:
$pos = strrpos($mystring, "b");
if ($pos === false) { // note: three equal signs
// not found...
}
// in versions older than 4.0b3:
$pos = strrpos($mystring, "b");
if (is_string($pos) && !$pos) {
// not found...
}
If needle is not a string, it is converted
to an integer and applied as the ordinal value of a character.
See also strpos(),
strrchr(), substr(),
stristr(), and strstr().
PoprzedniSpis treściNastępnystrrevPoczątek rozdziałustrspn
Wyszukiwarka
Podobne podstrony:
function strrposfunction strrposfunction mb strrposfunction mb strrposfunction fdf next field namefunction ccvs voidfunction mysql errorfunction mcal event set endfunction mcrypt cbcFunctional Origins of Religious Concepts Ontological and Strategic Selection in Evolved Mindsfunction domnode get contentfunction mcrypt module get algo key sizewięcej podobnych podstron