What is the syntax of the gmdate() function in PHP?
gmdate(format, timestamp)
Parameter | Description |
---|---|
timestamp | Optional. Specifies an integer Unix timestamp. Default is the current local time (time()) |
format | Required. 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");
?>