I have an array
$teste = [1,2,3,4];
<Input type="text" value ="teste[0]" />
//retorna "1"
How can I get all the array values in the inputs?
I have an array
$teste = [1,2,3,4];
<Input type="text" value ="teste[0]" />
//retorna "1"
How can I get all the array values in the inputs?
Loop your array by adding a input
to each item:
<?php
$teste = [1,2,3,4];
foreach ($teste as $t) {
echo "<input type='text' value='$t'>";
}
?>