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

[eluser]Bigil Michael[/eluser]
controller modified like this
Code:
$build_array = array();
        $fleets = $this->Classifieds_model->select_all_classifieds();
        foreach($fleets as $row){
            $sub = $this->Classifieds_model->list_all_classifieds($row['id']);
            foreach($sub as $subsub)
            {
                $sub_result[] = $this->Classifieds_model->count_classifieds($subsub['id']);
            }
            $build_array[] = array (
                'fleets_array' => $row,
                'listefleets_array' => $sub,
                'list' => $sub_result
            );
            
        }
        $meow = $build_array;
        $this->data['meow'] = $meow;
it shows an error like this
Quote:A PHP Error was encountered

Severity: Notice

Message: Undefined variable: sub_result

Filename: controllers/classifieds.php

Line Number: 58


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



Theme © iAndrew 2016 - Forum software by © MyBB