尝试
date_parse_from_format()
:
- $date = "2010-08-12";
- $d = date_parse_from_format("Y-m-d",$date);
- echo $d["month"];
date_parse_from_format()
:
- $date = "2010-08-12";
- $d = date_parse_from_format("Y-m-d",$date);
- echo $d["month"];