[eluser]Unknown[/eluser]
In order to load a function in a controller from a model is easy but how do you call a function within a class in a controller?
class Crud extends controller {
function index () {
????? how to load a function get_all ?????
}
function get_all () {
$mydata = $this->db->get('users');
foreach ($mydata->result() as $row) {
$aa= $row->username;
echo $aa;
}
}
}