作者itsIjs (身为乡民该为乡民所为)
看板PHP
标题Re: [请益] 请问时间差
时间Sat Jun 14 19:04:51 2008
感谢版友给的建议
分享一下後来写出来的解决函数
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