Method to filter an array by keys. both by key type (integer or string) and by keys specified in an filter array.
Class: bb_meta, called as $main
File: bb_meta.php (php)
function filter_keys($arr, $filter = array(), $keep_mode = true, $key_type = false)
$main->filter_keys($arr, $filter, $keep_mode, $key_type);
Returns: generic filtered array.
Note: by default
filter_keys strips off string keys.
Array to be filtered.
An array of keys to either keep or discard. An empty array, or default, will bypass this functionality and keep all keys.
true will keep all keys in the
false will discard all keys in
$filter is empty, does nothing.
Reduces array keys by integer (
false), string (
true) or neither (