看板 PHP 關於我們 聯絡資訊
感謝版友給的建議 分享一下後來寫出來的解決函數 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