Codeigniter get url parameters
Codeigniter get url parameters – You can get url parameters using url helper input get method. You can get the query string value from url using the below method.
Codeigniter get url parameters Example
You can get the url parameters simply as below-
Suppose we have following url and we want to get the url params-
Example:
www.example.com/my_controller/delete/99 |
You can get the controller method delete param value simply as below-
<?php class My_controller extends CI_Controller { public function delete($id = null){ echo $id; // will print 99 the url parameter } }
Advertisements
Add Comment
📖 Read More
- 1. Codeigniter get Controller Name from URL
- 2. Codeigniter get single row
- 3. Codeigniter Redirect HTTP Urls to HTTPS
- 4. Codeigniter Inner Join With Multiple Tables
- 5. Codeigniter Search Comma-separated values in MySql