Help echo an object
Posted: Mon Oct 05, 2009 4:09 pm
Hi, I have a variable $data that contains an object. I can't seem to access any of it's properties though. Kinda new to PHP. When I do a var_dump($data); I get the following output:
but if I then write
I get nothing.
Code: Select all
object(stdClass)#2 (1) {
["MakePaymentResult"]=>
object(stdClass)#3 (4) {
["isSuccess"]=>
bool(true)
["errorMessage"]=>
string(0) ""
["subType"]=>
string(25) "PsCreditCardPayment"
["psObject"]=>
object(stdClass)#4 (8) {
["isSuccess"]=>
bool(false)
["Type"]=>
string(4) "Moto"
["PaymentId"]=>
NULL
["CustomerId"]=>
int(714296)
["FromAccountId"]=>
int(306921)
["Amount"]=>
string(3) "2.3"
["PaymentDate"]=>
string(19) "0001-01-01T00:00:00"
["InvoiceId"]=>
NULL
}
}
}Code: Select all
echo $data->$MakePaymentResult->$PaymentDate;