Welcome Guest, Not a member yet? Register   Sign In
I need some help I wanna pass this parameter to a Controller
#4

Passing the variables as one string with seperators is a good idea, but there's another way:
PHP Code:
function test($name){
 
   $uri_seg $this->uri->uri_to_assoc();

 
   foreach($uri_seg as $para){
 
       // Do something with each of the URI segments passed in here after $name
 
   }

You can even define a default value for every parameter.
See CI's documentation: http://www.codeigniter.com/userguide3/li...i_to_assoc
Reply


Messages In This Thread
RE: I need some help I wanna pass this parameter to a Controller - by Wouter60 - 09-12-2015, 03:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB