I assume it is being sent like this: users=739&users=741&users=745 You cannot use $_POST, $_GET or $_REQUEST because these are arrays so each value is overwriting each other. I assume this is how getParams() gets its get and post values. So you need the original string which you can then parse. This is simple enough using $_SERVER['QUERY_STRING'] but this only works for get data. Since this is being posted you will have to use something like $HTTP_RAW_POST_DATA which will only work if you have always_populate_raw_post_data turned on in your php.ini or .htaccess
See: http://us3.php.net/manual/en/reserved.variables.httprawpostdata.php http://us3.php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data Mark On Mon, Mar 2, 2009 at 1:29 AM, Ralikwen <[email protected]> wrote: > > Hi, > an external application posts multiple parameters with the same name to my > application, the equivalent of this: > > {"users":[739,741,745],"instruments":[47]} > > when I use getParams I can only retrieve the last userId out of the list. > How could I retrieve the value of the users parameter as an array? > > Thanks for the help. > SWK > > > -- > View this message in context: > http://www.nabble.com/receiving-multiple-parameters-with-the-same-name-tp22283415p22283415.html > Sent from the Zend Framework mailing list archive at Nabble.com. > > -- Have fun or die trying - but try not to actually die.
