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
Post a Comment