codeigniter如何从模块加载数据到视图和控制器

I am unable to load $newdataa from module class to my view. It shows an error on the controller class at $newdataa line.

This is module class

$query=$this->db->get("pbinfo");

foreach($query->result() as $rows) 
{
       $newdataa = array(
                        'id' =>$rows->id,
                        'jtitle'  =>$rows->jtitle,
                        'skills' =>$rows->skills,
                        'email'         => $rows->email,
                        'country'    => $rows->country,
                        'rate'    => $rows->rate,
                        'website'   => $rows->website,
                        'phone'     => $rows->phone,
                        'aboutus' => $rows->aboutus,

                   );
               return true;    
         }
}

This is controller class

public function services()
{   
   $this->user_model->showfreelancer();
   $this->load->view("services",$newdataa);
}

Try to change this in your module:

return true;

to be:

return $this->db->select("pbinfo", $newdataa);