URL: http://codeigniter.com/forums/viewthread/113258/#572417
Tag(s): PHP
A PHP script to filter and only allow some of the array keys.
function filter_input_data($data, $allowed)
{
$allowed = array_flip($allowed);
return array_intersect_key($data, $allowed);
}
You must be logged in to comment