How can I parse this array? Thank you.
Array( [doctorDate] => Array ( [0] => Array ( [doctorOfDate] => 2013-10-02 [orderingCount] => 12 ) [1] => Array ( [doctorOfDate] => 2013-10-03 [orderingCount] => 8 ) ) )
Reply to discussion (solution)
What does it mean? What do you want to do
Assume that the array name is 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
The array is defined:
test=array('doctorDate'=> array(0=>array('doctorDate'=>'2013-10-02', 'orderingCount'=>12), 1=>array('doctorDate'=>'2013-10-03', 'orderingCount'=>8) ) )
I want to display the data in this array as follows:
2013-10-02 12
2013-10-02 8
I want to display the data in this array as follows:
2013-10-02 12
2013-10-02 8
Array( [doctorDate] => Array ( [0] => Array ( [doctorOfDate] => 2013-10-02 [orderingCount] => 12 ) [1] => Array ( [doctorOfDate] => 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'].'
';}}?>