Answers for "php html input array"

PHP
0

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>
Posted by: Guest on January-15-2021

Browse Popular Code Answers by Language