[eluser]Bigil Michael[/eluser]
i have changed my code
Code:
$build_array = array();
$fleets = $this->Classifieds_model->select_all_classifieds();
foreach($fleets as $row){
$build_array[] = array (
'fleets_array' => $row,
'listefleets_array' => $this->Classifieds_model->list_all_classifieds($row['id']),
//'sub_listings_count' => $this->Classifieds_model->count_classifieds($row['id'])
);
}
$meow = $build_array;
$this->data['meow'] = $meow;
foreach($meow as $crow)
{
foreach ($crow['listefleets_array'] as $lrow)
{
echo ' ' .$lrow['id'].' '. $lrow['heading'].' ';
$data['sub_listings_count'] = $this->Classifieds_model->count_classifieds($lrow['id']);
print_r($data['sub_listings_count']).' <br/>';
}
}
now i use echo the values in controller
it is working well. but like this it is not possible to print the values in view page
i tried a lot to write nested foreach
every time i failed..
can any one solve my problem..