Creating a route function and loading specific views
I am going to have a route like listings/$1/$2 but I am not sure what the best way to construct the function is I am wanting to do something like this:
Example:
$details = $this->createUrl();
$category = array();
foreach ($details as $segment) {
$category[] = array('mainCat' => $segment['mainCat'], 'subCat' => $segment['subCat']);
}
if($category['mainCat'] && $category['subCat'] == foo/bar)
{
$this->load->view();
}
Current:
$details = $this->createUrl();
$category = array();
foreach ($details as $segment) {
$category[] = array('mainCat' => $segment['mainCat'], 'subCat' => $segment['subCat']);
}
Total Views: 33 Today Views: 0















