Welcome Guest, Not a member yet? Register   Sign In
Could I use a route for this?
#1

[eluser]jzmwebdevelopement[/eluser]
Hey,

Below I have a function that gives me a url for every listingId that is found.

Is it possible to do this via a route?

At this stage I want to load a view for each
Code:
$subCat
but use the
Code:
$mainCat
as a main navigational item with the
Code:
$subCat
as a sub dropdown option that loads the specific view.

Code:
$detailsFunction = $this->createCategoryDetails();

  $ld = array();
  $url = array();

  foreach ($detailsFunction as $main)
  {
   $ld = array('listingId' => $main['listingId']);
  
   foreach($ld as $id)
   {
    $mainlisting = $main['listingId'];
    $mainCat     = strtolower($main['mainCat']);
    $subCatO     = strtolower($main['subCat']);
    $subCat      = str_replace(" ", "-", $subCatO);

    $structure = base_url().'listings/'.$mainCat.'/'.$subCat;

    var_dump($structure);

   }




Theme © iAndrew 2016 - Forum software by © MyBB