CodeIgniter Forums
Multiple uri's - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Multiple uri's (/showthread.php?tid=49970)



Multiple uri's - El Forum - 03-09-2012

[eluser]JonoB[/eluser]
I am using a form to submit filter parameters. There are multiple filters that can be selected, and some filters are multi-selects.

The form is posted, and data is returned. However, I would prefer to use the post-redirect-view method, which means that I have to translate the post data to uri segments.

With this in mind, I was going to use the $this->uri->uri_to_assoc(n) method. However, I am not sure how to get this working if some of the parameters can have multiple values.

The only method I can think of is to join the values for each key with a unique character (say '--'), use $this->uri->uri_to_assoc(n) to parse each key-value pair, and then explode() each of the values (on '--') again.

Any other ideas?


Multiple uri's - El Forum - 03-09-2012

[eluser]JonoB[/eluser]
Another problem: how do you get over the issue that one of the values may have a forward slash ('/') in the name?