Use instead an $_POST Array.
<form id="input-form" action="" method="post" >
<input id="email_1" name="email[]" />
<input id="role_1" name="role[]" />
<input id="email_2" name="email[]" />
<input id="role_2" name="role[]" />
<input id="email_3" name="email[]" />
<input id="role_3" name="role[]" />
</form>
After this you got an array like this:
echo'<pre>';
print_r($_POST['email']);
print_r($_POST['role']);
echo'</pre>';
Of course you still have to escape your input in dependency of your use.
After this you can use a normal foreach on the array.
$mails=array();
$count=count($_POST['role']);
for($i=0;$i<$count;$i++){
$mails["email_".$i]=$_POST['role'][$i];
}