public function select_fx($fx, $get_array = false)
{
$arr = array();
$keys = $this->get_keys();
if (empty($keys)) {
return false;
}
foreach ($keys as $index) {
$s = $this->read($index);
if (!is_array($s)) {
continue;
}
if ($fx($s, $index) === true) {
if (!$get_array) {
return $s;
} else {
$arr[$index] = $s;
}
}
}
if (!$get_array || empty($arr)) {
return false;
} else {
return $arr;
}
}