PHP gmdate() function

P
PHP gettimeofday() function
PHP gmmktime() function

What is the syntax of the gmdate() function in PHP?

gmdate(format, timestamp)
ParameterDescription
timestampOptional. Specifies an integer Unix timestamp. Default is the current local time (time())
formatRequired. Specifies the format of th

Examples of the function

Example 1. In this example,

<?php
// Prints the day
echo gmdate("l") . "<br>";

// Prints the day, date, month, year, time, AM or PM
echo gmdate("l jS \of F Y h:i:s A");
?>
PHP gettimeofday() function
PHP gmmktime() function

Add comment

Tutor Network

Share this

Learn PHP from A to Z