I'm struggling accessing data within Objects and arrays:
I've tried the following;
foreach($orders as $order) {
echo $orders;
echo $orders["Order"]
echo $orders["Order"][0]->OrderId;
echo $orders["Order"][0];
echo $orders["Order"]->OrderId;
echo $orders["Order"]->OrderId;
}
foreach($orders as $key => $value) {
echo $value;
}
I'm trying to process orders which I can then input into our Magento programmatically.
according to your screenshot it should work this way:
foreach($orders->fields['Order']['value'] as $order){
$OrderId = $order->fields['OrderId']['value'];
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.