PHP array多维数组 循环遍历输出

Array([total_results]=>2[trades]=>SimpleXMLElementObject([trade]=>Array([0]=>SimpleXM... Array ( [total_results] => 2 [trades] => SimpleXMLElement Object ( [trade] => Array ( [0] => SimpleXMLElement Object ( [orders] => SimpleXMLElement Object ( [order] => SimpleXMLElement Object ( [adjust_fee] => 0.00 [buyer_rate] => false [cid] => 50050485 [consign_time] => 2015-05-10 14:56:18 [discount_fee] => 0.00 [is_daixiao] => false [num] => 1 [num_iid] => 44729682146 [oid] => 943005273746589 [outer_iid] => 149821 [payment] => 20.00 [pic_path] => http://img03.taobaocdn.com/bao/uploaded/i3/TB1I7w1HpXXXXbBXXX_!!0-item_pic.jpg [price] => 20.00 [refund_status] => NO_REFUND [seller_rate] => false [seller_type] => C [shipping_type] => express [sku_id] => 82619705678 [sku_properties_name] => 价格性质:套系订金 [status] => WAIT_BUYER_CONFIRM_GOODS [title] => 天津套餐 [total_fee] => 20.00 ) ) [payment] => 20.00 [receiver_mobile] => 1525238**** [status] => WAIT_BUYER_CONFIRM_GOODS [tid] => 943005273746589 [type] => fixed ) [1] => SimpleXMLElement Object ( [orders] => SimpleXMLElement Object ( [order] => SimpleXMLElement Object ( [adjust_fee] => 0.00 [buyer_rate] => false [cid] => 50050473 [consign_time] => 2015-04-30 12:36:01 [discount_fee] => 0.00 [end_time] => 2015-05-10 12:36:35 [is_daixiao] => false [num] => 1 [num_iid] => 44789788776 [oid] => 1038208804732928 [outer_iid] => 146712 [payment] => 39.00 [pic_path] => http://img01.taobaocdn.com/bao/uploaded/i1/TB1ldXXXXXXXXX_!!0-item_pic.jpg [price] => 39.00 [refund_status] => NO_REFUND [seller_rate] => false [seller_type] => C [shipping_type] => express [sku_id] => 87518207724 [sku_properties_name] => 价格性质:套系订金 [status] => TRADE_FINISHED [title] => 套餐1 [total_fee] => 39.00 ) ) [payment] => 39.00 [receiver_mobile] => 1552050**** [status] => TRADE_FINISHED [tid] => 1038208804732928 [type] => fixed ) ) ) [request_id] => ziore2q4o4gb )

<table id="orders-list" cellspacing="0" cellpadding="0" border="0" class="coupons-table" width="100%">
<tr>
<th width="60">订单ID</th>
<th width="60">商品名称</th>
<th width="30">订单手机号</th>
<th width="60" nowrap>订单金额</th>
<th width="60" nowrap>创建时间</th>
<th width="60" nowrap>状态</th>
<th style="text-align:center; width:30px;">操作</th>
</tr>

</table>
展开
 我来答
惜雨随风
推荐于2017-09-09 · 超过76用户采纳过TA的回答
知道小有建树答主
回答量:130
采纳率:0%
帮助的人:107万
展开全部
//假设arr是上面的数据数组
foreach($arr['trades']->trade as $value){
echo $value->orders->order->oid;
echo $value->orders->order->title;
echo $value->receiver_mobile;
echo $value->orders->order->total_fee;
echo $value->orders->order->consign_time;
echo $value->orders->order->status;
}
追问

推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式