array in input field php code example
Example: php html input array
<?php
$a=$_POST['array'];
if ($a) {
?>
<pre>
<?=print_r($a);?>
</pre>
<? die; } ?>
<form action="?" method="POST">
<input type="text" name="array[]" value="1">
<input type="text" name="array[]" value="2">
<input type="text" name="array[]" value="3"> <!--taking array input by input name array[]-->
<input type="text" name="array[]" value="4">
<input type="submit" name="submit">
</form>