need help variable undefined

#2
[eluser]Sudz[/eluser]

Use this code

Controller:
Code:
$data[‘list_of_module’] = $this->userprofile->list_of_module();

Model:
Code:
//returns all module name and id from module table
  function list_of_module(){
            $this->db->select();
           $query =  $this->db->get(`module`)->result();

            foreach ($query as $row):
              
           $data[$row->id] = $row->name;
            
             endforeach;
        
          return $data;
  }

VIEW:

Code:
echo form_dropdown(‘category’,@$list_of_module);


Messages In This Thread
need help variable undefined - by El Forum - 05-03-2011, 04:53 AM
need help variable undefined - by El Forum - 05-03-2011, 05:07 AM
need help variable undefined - by El Forum - 05-03-2011, 05:09 AM
need help variable undefined - by El Forum - 05-03-2011, 05:14 AM
need help variable undefined - by El Forum - 05-03-2011, 05:19 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.