My question is, How to add data into array by HTML input and not only one value but add as much as I want
<body>
<form action="oop.php" method="post">
<input type="number" name="no[]">
<input type="number" name='no[]">
<input type="number" name="no[]">
<input type="submit" name="sub">
</form>
</body>
</html>
<?php
if (isset($_POST['sub'])) {
$no= $_POST['no'];
$ex = explode(",", $no);
$item = array ();
foreach ($ex as $item) {
echo $item; // Do something with item
print_r($item);
}
}
?>
THANKS IN ADVANCE