|
|
Tutorials » Php »
|
Topic |
What is a Get Date Function?
|
|
Explanation |
|
The "get_date()" function returns an array with date, time information for an unix timestamp.
Syntax:
getdate(timestamp)
In the above syntax the timestamp is an optional field, which specifies the time in a unix time format.
Example:
<?php
echo get_date();
?>
Result:
Array
(
[seconds] => 45
[minutes] => 52
[hours] => 14
[mday] => 22
[wday] => 3
[mon] => 3
[year] => 2009
[yday] => 23
[weekday] => Tuesday
[month] => March
[0] => 1138110765
)
In the above example the "get_date()" function will display all the ten default elements of the array, like seconds, minutes, hours, day of the month, day of the week, year, day of the year, name of the weekday, name of the month etc.
Note: (PHP 4, PHP 5)
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|