Welcome Guest, Not a member yet? Register   Sign In
Callbacks in Routing
#5

[eluser]simshaun[/eluser]
Yes, I've thought about that, but I'm not sure how to actually replace the dashes with nothing in order to get the controller name. (in .htaccess)

Is it not possible to apply a callback to a match such as $1 or $2?

I don't understand why I can't (simply) do
$route['([^/]+)'] = str_replace('-', '', '$1');

strtolower() seems to work... why wouldnt str_replace()?


Messages In This Thread
Callbacks in Routing - by El Forum - 11-07-2008, 02:10 PM
Callbacks in Routing - by El Forum - 11-07-2008, 02:14 PM
Callbacks in Routing - by El Forum - 11-07-2008, 02:18 PM
Callbacks in Routing - by El Forum - 11-07-2008, 02:26 PM
Callbacks in Routing - by El Forum - 11-07-2008, 02:49 PM
Callbacks in Routing - by El Forum - 11-07-2008, 04:02 PM
Callbacks in Routing - by El Forum - 11-07-2008, 04:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB