strrpos

(PHP3 , PHP4 )

strrpos --  Find position of last occurrence of a char in a string

Description

int 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.

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().


Hosted by Tonec Inc.