php - Get value from my array -
this question has answer here:
- how can access array/object? 4 answers
i got following array:
$resultaat= array('afterpay result' => $afterpay->order_result);
and following output:
array ( [afterpay result] => stdclass object ( [return] => stdclass object ( [afterpayorderreference] => 928241d9d1dfb45d7513f3bbb8f063 [checksum] => 8452479310a82dc9a8ce574e6ce180f4 [resultid] => 0 [statuscode] => [timestampin] => 1445938695282 [timestampout] => 1445938700423 [transactionid] => 450831 ) ) )
how retrieve value: 'statuscode' , value 'resultid' can save them in database.
can please me?
with following lines:
$status_code = $resultaat['afterpay result']->return->statuscode; $resultid = $resultaat['afterpay result']->return->resultid;
or direct array value (you don't have set array):
$status_code = $afterpay->order_result->return->statuscode; $resultid = $afterpay->order_result->return->resultid;
Comments
Post a Comment