unlikely... |
I use a key:value pair in my URI to distinguish required variables.
It looks like this: http://www.yourwebsite.com/controller/me...ar_id:1234 For this I have extended the core URI class and have a method that searches for key:value pairs in each available uri segment. If a segment is a key:value pair, it is removed from the segments array, and I rebuild the URI segments array. The found pairs are stored in an array params. So your webinar_id would be stored as: PHP Code: $this->params['webinar_id'] = 1234; Below are the methods that I use. Find the key:value pairs PHP Code: /** Reset the URI segment array PHP Code: /** Get all available parameters PHP Code: /** Get a specific parameter PHP Code: /** To get the value of webinar_id in your controllers method, or any method in any class just do: PHP Code: $webinar_id = $this->uri->get_param('webinar_id'); All of the above methods are placed in the extended core URI class MY_URI Hope this can help you out |
Messages In This Thread |
unlikely... - by Rashid - 12-29-2015, 10:11 AM
RE: unlikely... - by mwhitney - 12-29-2015, 10:30 AM
RE: unlikely... - by Rashid - 12-30-2015, 01:25 AM
RE: unlikely... - by mwhitney - 12-30-2015, 09:14 AM
RE: unlikely... - by cartalot - 12-30-2015, 06:56 PM
RE: unlikely... - by Martin7483 - 12-31-2015, 03:49 AM
|