title: Retrieve data from model to controller
body: <p>In User model data is print if I do echo $data. My question is how retrieve same data in user controller, I tried to do , but didn't work. </p>
  
  <p>user.php(model)</p>
  
  <pre><code>function display_children($parent, $level) 
         {  
      $result = mysql_query('SELECT title FROM tree '.'WHERE parent="'.$parent.'"');
  
       while ($row = mysql_fetch_array($result))
               {  
                     $data =  str_repeat('  ',$level).$row['title']."\n";
  
                     // echo $data  if i remove comment it display all data 
  
                     // i m getting all data on this variable $data 
  
                     $this-&gt;display_children($row['title'], $level+1);
               }
      }  
  </code></pre>
  
  <p>users_controller.php</p>
  
  <pre><code>public function admin_mlm($id){
  
       pr($this-&gt;User-&gt;display_children('Food',0));   // function argument work but no data printed here
  }
  </code></pre>