PHP date_parse_from_format() 函數
實例
根據指定的格式返回一個包含指定日期資訊的關聯數組:
<?php
print_r(date_parse_from_format("mmddyyyy","05122013"));
?>
print_r(date_parse_from_format("mmddyyyy","05122013"));
?>
定義和用法
date_parse_from_format() 函數根據指定的格式返回一個包含指定日期資訊的關聯數組。
語法
date_parse_from_format(format,date);
參數 | 描述 |
---|---|
format | 必需。規定格式(格式由 date_create_from_format() 接受)。 |
date | 必需。一個指定日期的字串。 |
技術細節
返回值: | 如果成功則返回包含指定日期資訊的關聯數組。 |
---|---|
PHP 版本: | 5.3+ |
