[eluser]cyberbuff[/eluser]
hello. I am new to ci and somewhat new to php ( with about 3 months exp). I have a controller: category. I want to show subcategories like somesite.com/category/subcat... how can i do that? I already have a index() function for category controller...what should be the next function?
the category controller looks like this:
Code:
if( !defined('BASEPATH') ) exit("No direct access, please!");
class Categories extends Controller
{
function Categories()
{
parent::Controller();
//load stuff
$this->load->model("categories_model");
}
function index()
{
$data["categories"] = $this->categories_model->showAllCategories();
$this->load->view("header");
$this->load->view("all_categories", $data);
$this->load->view("footer");
}
Regards
Abhisek