1<?php
2 $a=$_POST['array'];
3 if ($a) {
4 ?>
5<pre>
6<?=print_r($a);?>
7</pre>
8<? die; } ?>
9<form action="?" method="POST">
10 <input type="text" name="array[]" value="1">
11 <input type="text" name="array[]" value="2">
12 <input type="text" name="array[]" value="3"> <!--taking array input by input name array[]-->
13 <input type="text" name="array[]" value="4">
14 <input type="submit" name="submit">
15</form>