Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,255
Total Threads: 81,202
Total Posts: 566,935
There are 94 users currently browsing (tf).
  Our Partners:
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

CodeIgniter Framework help

Thread title: CodeIgniter Framework help
    Thread tools Search this thread Display Modes  
Prev Previous Post   Next Post Next
12-29-2012, 07:33 AM
unikorndesigns is offline unikorndesigns
unikorndesigns's Avatar
Status: Junior Member
Join date: May 2011
Expertise: Web Designing and Development
Software: Photoshop, Dreamweaver and etc
Posts: 41
iTrader: 0 / 0%

unikorndesigns is on a distinguished road

  Old  CodeIgniter Framework help

Please analyze the following code. This is being used in CodeIgniter framework...

"cat_id" => $results["rows"][$i]->cat_id,
"cat_name" => $this->Category_model->fetchcatinfo($results["rows"][$i]->cat_id, "cat_name"),
"cat_parent_id" => $this->Category_model->fetchcatinfo($results["rows"][$i]->cat_id, "cat_parent_id"),
"cat_desc" => $this->Category_model->fetchcatinfo($results["rows"][$i]->cat_id, "cat_desc"),
"cat_num_posts" => $this->Category_model->fetchnumposts($results["rows"][$i]->cat_id),
"cat_parent_id_name"=>$this->Category_model->fetchcatinfo($this->Category_model->fetchcatinfo($results["rows"][$i]->cat_id, "cat_parent_id"), "cat_name")
foreach($array as $item)
"cat_id" => $id,
"cat_name" => implode($spaces).$this->Category_model->fetchcatinfo($id, "cat_name"),
"cat_parent_id" => $this->Category_model->fetchcatinfo($id, "cat_parent_id"),
"cat_desc" => $this->Category_model->fetchcatinfo($id, "cat_desc"),
"cat_num_posts" => $this->Category_model->fetchnumposts($id),
"cat_parent_id_name"=>$this->Category_model->fetchcatinfo($this->Category_model->fetchcatinfo($id, "cat_parent_id"), "cat_name")
// echo "Parent ID : ".$parentids[0]["cat_id"]."<br><br>";
// echo "The array being passed to the view part: <br>";
foreach($disparray as $item)
$this->load->view("category", $finalarray);

In the view section when i try to output the array like print_r($row). It shows only the last element. When i try to display the contents of the $disparray in the controller part, its working fine.

I would like to know if instead of making and transferring $finalarray if i just transfer the $disparray how will i be able to display the contents of the array in the view part? Thanks in advance

Reply With Quote

Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed