I have a list of checkboxes in a GET form which results in a URL with a querystring like
?q=&cat=&city%5B%5D=28&city%5B%5D=26&sort=asc&order=name when submitted. The Object/Array behind this string looks like:
Array ( [q] => [cat] => [city] => Array (  => 28  => 26 ) [sort] => asc [order] => name )
I'm trying to create a link with one of those GET params changed, but I can't find a way to update a single value. So now I'm rebuilding the URL by creating an object based on the given query params.
If I pass this object (as shown above) to the second argument inside Craft's
url() function to use this URL on a simple
<a> tag, I get an
Array to string conversion error.
I seems Craft can't handle nested arrays in this function. Is there another method to generate an URL from such an object?