You can also change your form to actually pass an array by adding brackets to the name value of the tag. For example:
<form>
<input type="text" name="dates[1]">
<input type="text" name="dates[2]">
<!-- etc, etc -->
</form>
OR, better yet, use
<form>
<select multiple name="dates">
<option>Line 1
<option>Line 2
<option>Line 3
<option>Line 4
</select>
</form>
Then your visitors can select multiple options at once. You can then step thru the results with foreach or use print_r to see everything as you test it.
echo "<pre>";
print_r($_POST["dates"]);
echo "</pre>";
and...
foreach($_POST["dates"] AS $key => $value) {
$_POST["dates"] = trim($key);
}