PHP 时间格式转换(把秒数转换成时分秒格式,显示两个日期间的每一天)

gmstrftime(‘%H:%M:%S’,800);
显示格式如:00:03:27

$start_date =”2010-08-01″;
$end_date =”2010-09-01″
$arr = explode(“-”, $start_date);
$dateAll = (strtotime($end_date) – strtotime($start_date))/(3600*24);
for($i = 0; $i <= $dateAll; $i++ ){
$today = date(“Y-m-d”,mktime(0,0,0,$arr[1],$arr[2]+$i,$arr[0]));
echo $today;echo ”
“;
}

相关内容:

Leave a comment

3 Comments.

  1. 有点不大明白!晕

  2. 占据短小精悍的文章的沙发

  3. I have a problem with the premise of this article but I still think its pretty informative. I really like your writing style. Keep up the good work.

发表评论

您的电子邮箱不会被公开。 标记为 * 的区域必须填写

*


您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

有人回复时邮件通知我