1
I’m trying to make a file. php read an array, but I also want to assign an id to each value in Vector.
This is the html
<form method='GET'>
<input type="hidden" name="idArray[]" value="1" />
<input type="hidden" name="idArray[]" value="2" />
</form>
in php
$id1 = $GET[''];
this is where I get lost, because I don’t know how to put the array inside GET, I searched some forums and tested the ways they were made, but I was unsuccessful
Yes, it is possible!
echo $_GET['idArray'][0]
; you will need a for to list all values.– rray
Just do
$ids = $_GET['idArray'];
. Then just a for or foreach to show/run all.– Bacco