-
Notifications
You must be signed in to change notification settings - Fork 15
array_rpos
array_pos — Find the position of the last occurrence of a array in an array
int32 array_pos ( array $haystack, array $needle [, int32 $offset] )
array_rpos() finds the numeric position of the last occurence of needle in haystack. It's the generalized version of [strrpos].
haystack - The array to perform the search on.
needle - The "sub-string" to look for.
offset - If specified, search will start this number of elements from the beginning of haystack. If the value is negative, search will instead start from that many elements from the end of the array, searching backwards.
The position of where needle exists relative to the beginning of haystack (independent of search direction or offset). If needle does not appear in haystack, the return value is -1.
Unlike strrpos() in regular PHP, array_rpos() returns -1 on failure in PHP+QB and not false.
1.0 and above.