Curriculum
Course: PHP Basic
Login

Curriculum

PHP Basic

PHP Install

0/1

PHP Casting

0/1

PHP Constants

0/1

PHP Magic Constants

0/1

PHP Operators

0/1

PHP Reference

0/276
Text lesson

date_parse()

Example

Return an associative array with detailed information about a given date.

<?php
print_r(date_parse(“2013-05-01 12:30:45.5”));
?>

Definition and Usage

The date_parse() function returns an associative array with detailed information about a specified date.

Syntax

date_parse(date)

Parameter Values

 

Parameter

Description

date

Required. Specifies a date in a format accepted by strtotime().

Technical Details

Return Value:

Returns an associative array containing information about the parsed date on success. FALSE on failure

PHP Version:

5.2+