massivo wrote:
Hi friends.
If, in my action controller, i have this url:

http://www.example.com/view/5

how can I extract the info like this?:

module = default
controller = index
action = view
id = 5
test = 'test' -> the default value

Like when you create a route but in this case I only have the url.
Is there any way to make it easier?

Create a route, as if you were going to use it in the router, and:

$route = new Zend_C..._Router_Route(...);

$url = 'view/5';

$values = $route->match($url);

var_dump($values);


--
Michał Minicki aka Martel Valgoerad | [EMAIL PROTECTED] | 
http://aie.pl/martel.asc
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"Idleness is not doing nothing. Idleness is being free to do anything." --
Floyd Dell

Reply via email to