You are here

function boost_array_find in Boost 6

Returns all key/values in array that are equal.

Parameters

$needle: What your searching for

$haystack: Array of values

$a_not: Optional array of key names to exclude

1 call to boost_array_find()
boost_admin_boost_performance_page in ./boost.admin.inc
Form builder; Displays Boost's configuration page.

File

./boost.admin.inc, line 1702
All the code for the Boost module's administrative interface.

Code

function boost_array_find($needle, $haystack, $a_not = array()) {
  $out = array();
  foreach ($haystack as $key => $value) {
    if ($value == $needle) {
      $good = TRUE;
      foreach ($a_not as $not) {
        if (strpos($key, $not) !== FALSE) {
          $good = FALSE;
        }
      }
      if ($good) {
        $out[$key] = $value;
      }
    }
  }
  return $out;
}