输入banner图图片脚本导航/分类

MonMar1210:18:26+08002012时间格式转换解决方法

Mon Mar 12 10:18:26 +0800 2012 时间格式转换
上面的是个字符串,怎么把那个时间转换成2012-3-12 10:18:26格式 ,用php写的,谢谢啦

------解决方案--------------------
$s='Mon Mar 12 10:18:26 +0800 2012';
echo date('Y-m-d H:i:s',strtotime($s));
------解决方案--------------------
好像可以直接用date转吧,忘记了

$str='Mon Mar 12 10:18:26 +0800 2012';
echo date('Y-m-d G:i:s',strtotime($str));
------解决方案--------------------
探讨

$s='Mon Mar 12 10:18:26 +0800 2012';
echo date('Y-m-d H:i:s',strtotime($s));

------解决方案--------------------
探讨

好像可以直接用date转吧,忘记了

$str='Mon Mar 12 10:18:26 +0800 2012';
echo date('Y-m-d G:i:s',strtotime($str));