Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online

getdate function syntax tag tutorial 2013 Donate at flattr Flattr this





Alert! Connect with 10,000 Chating Online. Join Now

Php getdate () function

Write your php code

 
<?php ?>

Php Result


Your code below



(PHP 3, PHP 4 , PHP 5)

getdate -- Get date/time information

Syntax

array getdate ( [int timestamp] )

Returns an associative array containing the date information of the timestamp, or the current local time if no timestamp is given, as the following associative array elements:

Table 1. Key elements of the returned associative array

KeySyntaxExample returned values
"seconds"Numeric representation of seconds0 to 59
"minutes"Numeric representation of minutes0 to 59
"hours"Numeric representation of hours0 to 23
"mday"Numeric representation of the day of the month1 to 31
"wday"Numeric representation of the day of the week0 (for Sunday) through 6 (for Saturday)
"mon"Numeric representation of a month1 through 12
"year"A full numeric representation of a year, 4 digitsExamples: 1999 or 2003
"yday"Numeric representation of the day of the year0 through 365
"weekday"A full textual representation of the day of the weekSunday through Saturday
"month"A full textual representation of a month, such as January or MarchJanuary through December
0Seconds since the Unix Epoch, similar to the values returned by time() and used by date().System Dependent, typically -2147483648 through 2147483647.

Example 1. getdate() example

<?php
$today
= getdate();
print_r($today);
?>

The above example will output something similar to:

Array
(
    [seconds] => 40
    [minutes] => 58
    [hours]   => 21
    [mday]    => 17
    [wday]    => 2
    [mon]     => 6
    [year]    => 2003
    [yday]    => 167
    [weekday] => Tuesday
    [month]   => June
    [0]       => 1055901520
)

See also date(), time(), and setlocale().

Php getdate Function syntax tag

getdate php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online



Php getdate syntax tutorial

php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.


Function index

Variables

Expressions

Operators

Control-Structures

Cookies

Array

Date & Time

Directory function

File

Image

Operators

Form data handling

Mathematics operators

Mail

Php Mysql

Network Functions

Strings

php tutorial guides,functions, classes, code examples and tags for creating simple dynamic site to mysql database driven sites
 
 
Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online