Welcome Guest, Not a member yet? Register   Sign In
problem in listing category and subcategory in the same page
#13

[eluser]Nick_MyShuitings[/eluser]
If you look in your controller, where you are setting $this->data['k'], you are overriding that each time. I think you'd be better off doing something like the following:

Code:
foreach($fleets as $row){
            $sub = $this->Classifieds_model->list_all_classifieds($row['id']);
            foreach($sub as $subsub)
            {
                $sub_sub[] = $this->Classifieds_model->count_classifieds($subsub['id']);
            }            
            $build_array[] = array (
                'fleets_array' => $row,
                'listefleets_array' => $sub
                'sub_sub' => $sub_$sub
            );
            
        }

that at least would contain all the data and you could get at it in your view however you need.


Messages In This Thread
problem in listing category and subcategory in the same page - by El Forum - 05-09-2011, 11:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB