$item) { $item = filter_var($item, $type, $options); if ($item !== false) { $newArr[$id] = $item; } } return $newArr; } }