FiveFeet

//array
$foo = filter_input(INPUT_POST, 'foo', FILTER_SANITIZE_SPECIAL_CHARS, FILTER_REQUIRE_ARRAY);
// Comma-separated String
$foo = implode(",",filter_input(INPUT_POST, 'foo', FILTER_SANITIZE_SPECIAL_CHARS, FILTER_REQUIRE_ARRAY));