我可以在2d數組中獲取日期時間嗎?我是初學者php developer.hope sme可以告訴或分享任何想法。php - 如何在2d數組中的2個日期時間之間返回每分鐘
讓說我的輸入爲:
$startdate = 2013/7/01;
$enddate = 2013/7/02;
我怎麼能有功能:
getMinuteRange($startdate, $enddate);
,我需要的函數的輸出爲:
Array (
[0] => Array
(
[0] => 01/7/2013
[1] => 12.00 a.m
)
[1] => Array
(
[0] => 01/7/2013
[1] => 12.01 a.m
)
[2] => Array
(
[0] => 01/7/2013
[1] => 12.03 a.m
)
.
.
.
[2879] => Array
(
[0] => 02/7/2013
[1] => 11.59 p.m
)
)
看看這是否有幫助:http://stackoverflow.com/questions/676824/how-to-calculate-the-difference-between-two-dates-using-php – Maximus2012