Is there a way to represent/pass a multidimensional array like
array( array('foo' => 'bar') , array('language' => 'php'), ...);
into a GET string?
For simple arrays such as
array(1,2,3,4)
I can represent it like this
?ids=1,2,3,4
But I don’t know how to represent multidimensional arrays
There’s several ways you could do it.
One way is to serialize() it and then unserialize() it on the page that reads it.
Another way is to json_encode() it and then json_decode() it on the page that reads it.
Or, in keeping with the CSV-style it sounded like you prefer, you could just delimit the next layer of the array with a different delimiter, ex.
becomes
Finally, PHP will also parse arrays in the querystring like: