Tuesday, 15 March 2011

How to get PHP $_GET array? -


Is it possible to have value as an array in $ _ GET ?

If I http: //link/foo.php? Id = 1 & amp; Id = 2 & amp; I am trying to send the link to id = 3 , and I want to use the $ _ GET ['id'] on the PHP side, this value is an array how is it possible? Because now the resonance is $ _GET ['id'] back 3 . Its last id is in the header link. any suggestion?

The usual way to do this in PHP is to replace id [] Just enter id in the URL:

  http: //link/foo.php? Id [] = 1 & amp; ID [] = 2 & amp; The id [] = 3  

then $ _ GET ['id'] will be an array of those values, it is not particularly beautiful, but from the box Works out.


No comments:

Post a Comment