<form action="" method="get">
Data 1: <input type="text" name="data[]" maxlength="64" size="64"/><br/>
Data 2: <input type="text" name="data[]" maxlength="64" size="64"/><br/>
<input type="submit"/>
</form>
<?php
$options = FILTER_FLAG_STRIP_HIGH | FILTER_REQUIRE_ARRAY;
if (isset($_GET['data'])) {
$data = filter_input(
INPUT_GET, // source
'data', // parameter name
FILTER_SANITIZE_STRING, // filter
$options // options
);
var_dump( $data );
}
?>
Output