You could also serialize the array, base64_encode it, and then pass it
as a single parameter to your controller. Then reverse the process.

Mark

2009/12/10 WebCorp s.r.o. | Jan Juříček <[email protected]>:
> Hi,
>
>
>
> Is there a way to pass an associative array via URL to the request object?
>
>
>
> This /controller/action/arr/foo/arr/bar would be converted to $arr ==
> array("foo", "bar"); and I would like to pass something like
> /controller/action/arr[foo1]/bar/arr[foo2]/bar so I would have $arr == array
> ("foo1" => "bar", "foo1" => "bar")
>
>
>
> Reason is simple: I have a table, where table header is used among other
> things to sort the DB results. I want to be able to sort by multiple columns
> and I'm looking for a way how to tell my scripts that the first column
> should be sorted in DESC, the sekond one in ASC...
>
>
>
> So basically I need to create an URL, which would result in calling the
> $this->getRequest()->getParams() in my controller with result for example
> array('_sort' => array('column1' => 'desc', 'column2' => 'asc')); ...
>
>
>
> Or is there a better approach on this issue?
>
>
>
> Thanks for your time
>
> Regards
>
> Jan



-- 

-----------------------------------------
Mark Steudel
P: 206.375.7244
[email protected]

. : Work : .
http://www.mindfulinteractive.com

. : Play : .
http://www.steudel.org/blog

Reply via email to