Welcome Guest, Not a member yet? Register   Sign In
sub functions in class
#1

[eluser]Guntars[/eluser]
Hi,
I have a problem with functions in classes

here is an example
Code:
class Admin extends Controller {
var $admin;
var $id;

    function Admin()
    {
        
        parent::Controller();
        
    
    }
function someffunction(){
function subfunction(){
$result=$this->db->get('articles');
$result=$result->result();
return $result;

}

$newresult=$this->somefunction()->subfunction();
print_r($newresult);
}

become as error, I try to find in here and in google, but can't really find if possible to get sub functions with data.

I know have nice thing &get;_instance, but my question if it's possible to get without this.


Messages In This Thread
sub functions in class - by El Forum - 05-22-2009, 11:35 AM
sub functions in class - by El Forum - 05-22-2009, 12:06 PM
sub functions in class - by El Forum - 05-22-2009, 12:15 PM
sub functions in class - by El Forum - 05-22-2009, 12:51 PM
sub functions in class - by El Forum - 05-22-2009, 08:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB