Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
怎么会
$a = "Thursday, 10 January, 2013";
当我这样做时给我2012-01-12
$b = date('Y-m-d', strtotime($a));
strtotime()期望字符串是英文格式的日期。由于上述显然不是这样,它不会返回预期的结果。例如,以下内容将正确呈现:
strtotime()
$a = "January 10, 2013"; $b = date('Y-m-d', strtotime($a)); echo $b;