function boost_admin_htaccess_array_find in Boost 7
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_admin_htaccess_array_find()
- boost_admin_htaccess_settings in ./
boost.admin.htaccess.inc - Form builder; Configure boost settings.
File
- ./
boost.admin.htaccess.inc, line 298 - Admin page callbacks for the boost module.
Code
function boost_admin_htaccess_array_find($needle, $haystack, $a_not = array()) {
$out = array();
foreach ($haystack as $key => $value) {
if (is_string($value) && FALSE !== strpos($value, $needle)) {
$good = TRUE;
foreach ($a_not as $not) {
if (strpos($key, $not) !== FALSE) {
$good = FALSE;
}
}
if ($good) {
$out[$key] = $value;
}
}
}
return $out;
}