Welcome Guest, Not a member yet? Register   Sign In
(Solved) how to load/call a function within a class?
#1

[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;
}
}

}


Messages In This Thread
(Solved) how to load/call a function within a class? - by El Forum - 12-02-2010, 03:25 PM
(Solved) how to load/call a function within a class? - by El Forum - 12-02-2010, 03:35 PM
(Solved) how to load/call a function within a class? - by El Forum - 12-02-2010, 04:10 PM
(Solved) how to load/call a function within a class? - by El Forum - 12-02-2010, 04:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB