I\'m trying to show the results from my database in a dynamic table, I\'m using codeigniter:
This is my model:
class Cliente_model extends CI_Model {
fu
Write this in your model function:
$query = $this->db->get('cliente');
$data = $query->result_array();
return $data;
And this in your controller:
$data['client']= $this->cliente_model->obtenerDatos();
$this->load->view('cliente_view',$data);
Then add this to your view:
etc...
As you will see, $data['client']
is now holding your database info, and you can read it by looping through the associative array in your view. More info on query builder class here.