2008年9月9日星期二

Re: [fw-mvc] Array URL Parameters

-- Bradley Holt <bradley.holt@foundline.com> wrote
(on Tuesday, 09 September 2008, 01:56 PM -0400):
> OK, I think this is probably a dumb question. Is there a syntax for having one
> URL parameter with multiple values pulled in as an array? For example, without
> using MVC I could just do:
>
> http://www.example.com/?controller=foo&action=bar&param[]=x&param[]=y
>
> And access param as:
>
> $param = $_GET['param'];
> echo $param[0]; //echos x
> echo $param[1]; //echos y
>
> Do I simply do the following?
>
> http://www.example.com/foo/bar/param[]/x/param[]/y/
>
> I think I may have answered my own question - now I'll try it and find out ;-)
>
> Are there any other ways to do this that people have tried?

There's been an issue in the tracker requesting support for this for
some time. Bump it. :)

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: