<input name="algo[0]"/> <input name="algo[1]"/> <input name="algo[2]"/>
foreach ($_POST['algo'] as $id => $value) // ...