Home >Backend Development >PHP Tutorial > 怎么将2012/9/6转换成2012-09-09

怎么将2012/9/6转换成2012-09-09

WBOY
WBOYOriginal
2016-06-13 12:59:26925browse

如何将2012/9/6转换成2012-09-09?
如何将2012/9/6转换成2012-09-09?
------解决方案--------------------
$s='2012/9/6';
echo date("Y-m-d",strtotime($s));

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