uri->segment_array() probelm - 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: uri->segment_array() probelm (/showthread.php?tid=37005) |
uri->segment_array() probelm - El Forum - 12-23-2010 [eluser]mikeymayhem[/eluser] Hi there, I recently discovered the uri->segement_array feature. I am having some trouble getting it working properly though. Maybe im thinking it should be doing stuff it cant. basically i have a page with multiple options to allow a user to refine a set of results. This means in need to allow key value pairs to be passed via the url which i will then use to refine my results, i was of the understanding that i would be able to define an array of defaults that would be used if the uri /key/value pair wasnt set and it wouldnt matter if some were not set or what order they were set in? i have .htaccess removing index.php so the controller currently aiming to use this script is home/ i have a route set up for this which is Code: $route['home/(:any)'] = 'home/index/$1'; then i want to be able to use pagination and pass params to functions from the array so my uri segments might look like this home/num/5/offset/10/band/someband/venue/somevenue then i might again look something like this home/band/someband/venue/somevenue am i missing something crucial here or does it just not work this way? should i be checking if those key value pairs are set in the array created by ruri->segment_array() ?? any help is greatly appreciated here's a stripped down version of my controller Code: public function index() uri->segment_array() probelm - El Forum - 12-23-2010 [eluser]mikeymayhem[/eluser] Hi i have just realised my major blunder! i was using the wrong uri function! Ignore me!! :S |