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

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -