Re: [請益] 請問時間差

看板PHP作者 (身為鄉民該為鄉民所為)時間17年前 (2008/06/14 19:04), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/3 (看更多)
感謝版友給的建議 分享一下後來寫出來的解決函數 function diffTime($arg1,$arg2) { $arg1 = strtotime( $arg1 ) ; $arg2 = strtotime( $arg2 ) ; $diff = ($arg2 - $arg1) / 60 ; return "$diff 分鐘" ; } P.S. 在sql裡面的時間都是time格式 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.56.152.31
文章代碼(AID): #18KwNKQv (PHP)
討論串 (同標題文章)
文章代碼(AID): #18KwNKQv (PHP)