如何从以下数组中检索日期值?实际上,我想要做的是循环遍历此数组,并为每个日期值创建一个表格单元格。谢谢,
Array ( [2011-11-18 00:00:00] => 3 [2011-11-22 00:00:00] => 2 )
答案 0 :(得分:2)
请参阅array_keys()文档
答案 1 :(得分:2)
如果您想循环播放,请尝试:
// assuming variable is named $array
foreach($array as $k => $v) {
echo "Key: ".$k.", Value: ".$v."<br />\n";
// or whatever it is you want with them.
}
答案 2 :(得分:2)