class customer_list extends MY_Controller { function some_method($customer_id, $subnav_item) { $this->sub_nav_id = $subnav_item; $this->customer_id = $customer_id; $uri_string = get_class($this) . '/some_method/' . $this->customer_id . '/' . $this->sub_nav_id; } } |
when calling the class I would do something like this : http://www.mysite.com/customer_list/some_method/1/2
This would call the method “some_method” and pass 2 parameters ($customer_id = 1 and $subnav_item = 2)
Its that simple

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Void « Default
Life
Earth
Wind
Water
Fire
Light 
[...] This post was mentioned on Twitter by Zayin Krige and Muhammad Yoosuf, magpielab. magpielab said: Passing multiple parameters to your CodeIgniter methods – http://bit.ly/WDy3d via @zayinkrige [...]