3
$a = "Thursday, 10 January, 2013";
给我2012-01-12当我做
$b = date('Y-m-d', strtotime($a));
$a = "Thursday, 10 January, 2013";
给我2012-01-12当我做
$b = date('Y-m-d', strtotime($a));
strtotime()
预计该字符串是英文格式的日期。由于上述显然不是这样,它不会返回预期的结果。作为一个例子,以下将正确呈现:
$a = "January 10, 2013";
$b = date('Y-m-d', strtotime($a));
echo $b;
非常感谢。我会记住的。 –