php 获取指定时间所在月份的天数

#   php 获取指定时间所在月份的天数



<?php 
    $days = cal_days_in_month(CAL_GREGORIAN, 4, 2011);
    echo "返回2011-4的天数 ".$days."<br/>";
    $days = date('t', strtotime("2011-4-1"));
    echo "返回2011-4的天数 ".$days."<br/>";
    $days = date("t"); 
    echo "当前月的天数 ".$days."<br/>";
?>


# xiaoxiao [ 2016-04-21 ]

# Address in this article

# http://www.s7smile.com/php/33

# s7smile.com