请问一下该如何解析出这个数组呢?谢谢了。
array
(
[doctordate] => array
(
[0] => array
(
[doctorofdate] => 2013-10-02
[orderingcount] => 12
)
[1] => array
(
[doctorofdate] => 2013-10-03
[orderingcount] => 8
)
)
)
分享到: ?array([0]?=>?array(...' data-pics=''>
------解决方案--------------------
假设数组名为:test
test['doctordate'][0]['doctorofdate']=2013-10-02
test['doctordate'][0]['orderingcount']=12
test['doctordate'][1]['doctorofdate']=2013-10-03
test['doctordate'][1]['orderingcount']=8
这个数组的定义是:
test=array('doctordate'=>
array(0=>array('doctordate'=>'2013-10-02',
'orderingcount'=>12),
1=>array('doctordate'=>'2013-10-03',
'orderingcount'=>8)
)
)
------解决方案--------------------
array(0=>array('doctordate'=>'2013-10-02',
'orderingcount'=>12),
1=>array('doctordate'=>'2013-10-03',
'orderingcount'=>8)
)
);
foreach ($test as $arr)
{
foreach ($arr as $value)
{
echo $value['doctordate'].' '.$value['orderingcount'].'
';
}
}
?>