faya faya - 6 months ago 35
PHP Question

How to get PHP $_GET array?

Is it possible to have a value in

as an array?

If I am trying to send a link with
, and I want to use
on the php side, how can that value be an array? Because right now
echo $_GET['id']
is returning
. Its the last id which is in the header link. Any suggestions?


The usual way to do this in PHP is to put id[] in your URL instead of just id:


Then $_GET['id'] will be an array of those values. It's not especially pretty, but it works out of the box.