I'm trying to get the controller, method and queries from a URL array. Something like this:
'home/news/[day]/[month]/[slug]/'
I need some regex which will give me the following:
Controller: home Method: News Arguments: day, month, slug
For the arguments, it'd be nice if I could somehow get the name inside the brackets so I can put them into an associative array in PHP. e.g: ("day"=>$day).
I'm really stuck with this, and tried looking at several PHP frameworks for guidance but nothing really accomplishes exactly what I want above, especially using regex.
I'd appreciate any tips / help / links! Thanks!