I’m sure this is very simple.We have an ajax call to a controller. The call passes in a value pair – an identifier AND a value. I need to know the name of the identifier as well as the value so that I can do this:
switch ($identifier) {
case 'country':
//set value for something
break;
case 'region':
//set value for something else
break;
}
I would prefer not to pass an additional value in because it’s not necessary.
I tried this and, apart from being disgusting convoluted code, it didn’t work!
$requestparams=$this->_request->getParams();
list($controller,$action,$module,$levelpair)=$requestparams;
list ($level,$id)=$levelpair;
Try this: