Home >Backend Development >PHP Tutorial >PHP生手,救各位老师帮助看看

PHP生手,救各位老师帮助看看

WBOY
WBOYOriginal
2016-06-13 11:14:381079browse

PHP新手,救各位老师帮助看看。
echo $_POST['startDate']; STARTDATE 这个值是2012-01-12 、 这时我想让他输出 201201
需要用什么方式啊。


------解决方案--------------------
echo date("Ym",strtotime($_POST['startDate']));
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