Home  >  Article  >  Backend Development  >  啊为什么会这么呢

啊为什么会这么呢

WBOY
WBOYOriginal
2016-06-13 12:29:42821browse

啊啊啊,为什么会这样呢?
想做一个万年历,但是用date函数生成的月份比如二月份,是显示02的,怎么让他变成2呢?你自己比较一下
echo date('Y-m-d');

echo date('Y-n-d');
的结果
月份
m 数字的,有前缀0 01–12
n 数字的,没有前缀0 1–12
F 月份全称 1月 – 12月
M 月份的前3个字母 Jan - Dec

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn