Need help: Encoding and Decoding URLs in controller parameters |
[eluser]philmctim[/eluser]
I want to pass a string to a controller via a URI segment. The string may have a space in it. After 'urlencode'-ing the string, the URL looks like this: http://localhost/cfb/admin/add_team_file...P/West+Ham (i.e. "West Ham" becomes "West+Ham") In the 'add_team_file' controller function, the second parameter is given as: "West_Ham" I apply 'urldecode' to that string with no effect. 1) What happened along the way to switch "West+Ham" to "West_Ham" 2) I could apply a str_replace('_', ' ', $param2) to switch the underscore to a space, but I feel this might have unexpected consequences (what if the text *should* have an underscore?). Any advice/insight would be appreciated. Thanks |
Welcome Guest, Not a member yet? Register Sign In |