继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

php 获取时间差

android开发学习视频
关注TA
已关注
手记 304
粉丝 52
获赞 322


function timediff($begin_time,$end_time){     if($begin_time < $end_time){        $starttime = $begin_time;        $endtime = $end_time;     }     else{        $starttime = $end_time;        $endtime = $begin_time;     }     $timediff = $endtime-$starttime;     $days = intval($timediff/86400);     $remain = $timediff%86400;     $hours = intval($remain/3600);     $remain = $remain%3600;     $mins = intval($remain/60);     $secs = $remain%60;     $res = array("day" => $days,"hour" => $hours,"min" => $mins,"sec" => $secs);     return $res;}


打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP