You are here

function flickr_in_array_r in Flickr 7

Returns TRUE if a value is found in a multidimensional array. See http://stackoverflow.com/a/4128377.

Parameters

string $needle: The value to be matched.

array $haystack: The array to match.

bool $strict: If set to TRUE also check the types of the needle in the haystack.

Return value

bool TRUE if match found.

2 calls to flickr_in_array_r()
flickr_album in ./flickr.inc
Render multiple photos as an album.
flickr_filter_callback_photo in filter/flickr_filter.module
Filter callback for a photo.

File

./flickr.inc, line 1701
The Flickr API functions.

Code

function flickr_in_array_r($needle, $haystack, $strict = FALSE) {
  foreach ($haystack as $item) {
    if (($strict ? $item === $needle : $item == $needle) || is_array($item) && flickr_in_array_r($needle, $item, $strict)) {
      return TRUE;
    }
  }
  return FALSE;
}