您的位置:首页 > 编程语言 > PHP开发

PHP获取每月第一天与最后一天

2014-04-11 17:13 253 查看
<?php
function getthemonth($date)
{
$firstday = date('Y-m-01', strtotime($date));
$lastday = date('Y-m-d', strtotime("$firstday +1 month -1 day"));
return array($firstday,$lastday);
}
$today = date("Y-m-d");
$day=getthemonth($today);
?>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐