i am using $front->getRequest()->getParams() to get the url params. They look like this
Zend_Debug::dump($front->getRequest()->getParams());
array(4) {
["id"] => string(7) "3532231"
["module"] => string(7) "test"
["controller"] => string(6) "index"
["action"] => string(5) "index"
}
i am interested in running this through preg_match_all to get back only the id numbers by using some regexp similar to ([\s0-9])+
for some reason i cant isolate that number.
There is the possibility that there will be more id like values in the array, but the preg_match_all should give them back to me in a new array
any ideas?
thanks
array_filter() is the way to go here.
You might also want to replace the preg_match() with is_numeric() for performance.
That should give the same results.