缺少元素添加到數組我的小時/分鐘的陣列,添加經由功能
$array = array("09:00","09:05","09:10","09:15","09:20","09:25","09:30","09:35","09:40","09:45","09:50","09:55","10:00","10:05","10:10","10:15","10:20","10:25","10:30","10:35","10:40","10:45","10:50","10:55",15:00","15:05","15:10","15:15","15:20","15:25","15:30","15:35","15:40","15:45"," 15:50","15:55","16:00","16:05","16:10","16:15","16:20","16:25","16:30","16:35","16:40","16:45","16:50","16:55");
如何可以添加缺少的時間?(從11:00到14點55分)的元素用5不同從一個另一個分鐘。
爲什麼「添加缺少的」時間?這會給你買什麼嗎?如果你只是從頭開始生成完整的數組,那會不會更簡單?你甚至需要一個數組的結果,還是你只是想要一個一個地處理它們? – Jon 2013-05-03 10:16:35
你可以得到第一個和最後一個元素,並簡單地生成新的數組:)。 – nacholibre 2013-05-03 10:16:49
無論如何,如果所有的值都是按順序排列的數字,那麼爲什麼還要把它們全部存儲在一個數組中呢?給定* N *時間,您將始終能夠找到下一個** x **許多值? – Emissary 2013-05-03 10:18:11