Welcome Guest, Not a member yet? Register   Sign In
uri_to_assoc issue
#1

[eluser]neomech[/eluser]
Hi there,

I'm passing a url-encoded piece of information into my controller, and I'm having trouble using uri_to_assoc to access it, which has me confused.

My code looks like this:

Code:
$var=$this->uri->uri_to_assoc(1,$url_data);

If my url is www.mysite.com/controller/method/filter/brandToyota, then I'm properly getting an array $var('filter'=>'brandToyota').

What I'm trying to do though is get my filter data in a format that's a little more easy to read, particularly as I'll have multiple filters applied in some cases and I don't want to use querystrings. So I'm trying to pass brand=Toyota, although url-encoded of course.

Why doesn't this work?

Quote:www.mysite.com/controller/method/filter/brand=Toyota

(errr...I don't know how to display that properly in the forums....there's a %,3,D (with no commas) between brand & Toyota in the url, not an equals sign)

In this case uri_to_assoc is only returning "brand"....I get an array $var('filter'=>'brand'), which obviously doesn't work for me.

I would have thought the "url safe" characters wouldn't have any effect on uri_to_assoc. In any case, any ideas how to get around this?

Thanks for any help!


Messages In This Thread
uri_to_assoc issue - by El Forum - 09-08-2009, 06:13 PM
uri_to_assoc issue - by El Forum - 09-08-2009, 06:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB