Help with Array


Hello everyone, i’m new on this forum, i’m not really good with php and i’m trying to retrive the values from an array, here is the code:

if ($Paypal->success())
$response = $Paypal->getAPIResponse();
$response = $Paypal->getAPIException();


the result is this:

object(stdClass)#6 (9) { 
["Timestamp"]=> string(20) "2012-04-11T14:22:11Z" 
["Ack"]=> string(7) "Success" 
["CorrelationID"]=> string(13) "97a0fbe7a0173" 
["Version"]=> string(3) "2.4" 
["Build"]=> string(7) "2764190" 
object(stdClass)#7 (2) { 
["_"]=> string(5) "60.00" 
["currencyID"]=> string(3) "USD" } 
["AVSCode"]=> string(1) "X" 
["CVV2Code"]=> string(1) "M" 
["TransactionID"]=> string(17) "9NH25737N5897964X" }

Could you explain how to retrive the values?
i have try this:
foreach ($response as $obj_key =>$k)
echo $obj_key.’ '.$k."

and this is the result:

Ack Success:
CorrelationID e7de0db3e618e:
Version 2.4:
Build 2764190:

Catchable fatal error: Object of class stdClass could not be converted to string
in /home/public_html/ on line 229

Thank you very much for you help.


;D this work fine:[php]echo $response->Ack;[/php]