<?php
//日期
$date="2016-11-11 11:11:11";
//转换成时间戳
$timestrap=strtotime($date);
//格式化,取出月份
echo date('m',$timestrap);
提取日期月份
最新推荐文章于 2024-04-25 11:07:58 发布
<?php
//日期
$date="2016-11-11 11:11:11";
//转换成时间戳
$timestrap=strtotime($date);
//格式化,取出月份
echo date('m',$timestrap);