1
I have an array
$teste = [1,2,3,4];
<Input type="text" value ="teste[0]" />
//retorna "1"
How I could bring all array values into inputs?
1
I have an array
$teste = [1,2,3,4];
<Input type="text" value ="teste[0]" />
//retorna "1"
How I could bring all array values into inputs?
2
Loop your array by adding a input
for each item:
<?php
$teste = [1,2,3,4];
foreach ($teste as $t) {
echo "<input type='text' value='$t'>";
}
?>
Browser other questions tagged php array loop return
You are not signed in. Login or sign up in order to post.
Try to explain better what you need and what you’ve tried. It’s unclear exactly what your question is.
– fernandosavio
@fernandosavio things start to make more sense when the question is well formatted
– Costamilam