我来自 Java 和 C# 世界,只是想知道如何将格式化为mm/yyyy
PHP 5.3 中的日期的字符串解析。
我尝试过以下方法:
date_parse_from_format('mm/yyyy', '05/2013');
然后返回的数组报错:
[2] => Unexpected data found.
[5] => The separation symbol could not be found
[7] => Data missing
如何解析格式为mm/yyyy
PHP 5.3 的字符串的日期?
这是完整的var_dump
:
Array
(
[year] => 2013
[month] => 20
[day] =>
[hour] =>
[minute] =>
[second] =>
[fraction] =>
[warning_count] => 0
[warnings] => Array
(
)
[error_count] => 3
[errors] => Array
(
[2] => Unexpected data found.
[5] => The separation symbol could not be found
[7] => Data missing
)
[is_localtime] =>
)