Can you tell me how to parse out this array? Thank you, sir.
Array
(
[Doctordate] = = Array
(
[0] = = Array
(
[Doctorofdate] = 2013-10-02
[Orderingcount] = 12
)
[1] = = Array
(
[Doctorofdate] = 2013-10-03
[Orderingcount] = 8
)
)
)
Share to:
------Solution--------------------
Suppose 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 definition of this array is:
Test=array (' doctordate ' =
Array (0=>array (' doctordate ' = ' 2013-10-02 ',
' Orderingcount ' =>12),
1=>array (' doctordate ' = ' 2013-10-03 ',
' Orderingcount ' =>8)
)
)
------Solution--------------------
$test =array (' doctordate ' =
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 ']. '
';
}
}
?>