PHP: How to access array values returned by a static function?

Posted by Prashant on Stack Overflow See other posts from Stack Overflow or by Prashant
Published on 2010-05-10T16:50:16Z Indexed on 2010/05/10 16:54 UTC
Read the original article Hit count: 278

Filed under:
|
|

I am running following code, getAccount() is a static function,

$ac_info = AccountClass::getAccount($ac_code);
print_r($ac_info);

and getting following output

AccountClass Object ( [account_code] => [email protected] [username] => XYZ [email] => [first_name] => [last_name] => [company_name] => [id] => [email protected] [balance_in_cents] => 0 [created_at] => 1271333048 [state] => active )

But I want to access the value of "account_code" shown above, how to access it, and AccountClass Object what is this, this is array or what? I am not getting it properly.

Please explain what is AccountClass Object and how to access value of properties account_code, first_name inside this array.

Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about static