@lew
In CodeIgniter, you can pass variables in URL by using the uri->segment() method.
Here's an example of how you can pass variables in URL in CodeIgniter:
1
|
$route['controller/method/(:any)'] = 'controller/method/$1'; |
1 2 3 |
public function method($variable) { echo $variable; } |
1
|
http://example.com/controller/method/variable |
In this example, "variable" is the variable that you are passing in the URL. You can pass multiple variables in the URL and access them in the controller using the uri->segment() method.