How to make PHP recognize multiple instance of parameter as an Array? -


is there option in php via (php.ini) recognize parameter passed multiple times in url array?

/cars.php?color=a&color=b 

the above query should result in array of colors ['a','b'] instead of second parameter 'b' overwriting first parameter 'a'

use this:

/cars.php?color[]=a&color[]=b              //^^        ^^ 

no need enable in php.ini, accessing $_get['color'] return array.


Comments

Popular posts from this blog

c# - SharpSsh Command Execution -

How to run C# code using mono without Xamarin in Android? -

python - Specify path of savefig with pylab or matplotlib -