Author: Web Admin in Marbella

PHP Date and Time

The PHP date() function is used to format a date and/or a time. Syntax: date(format,timestamp); ParameterDescriptionformatRequired. Specifies the format of the timestamptimestampOptional. Specifies a timestamp. Default is the current date and timeEx: <?php echo "Today's date is :"; $today = date("d-m-Y"); echo $today; ?> Output: