The PHP date() function converts timestamp to a more readable date and time.


Syntax of the PHP date() function:

date(format, timestamp)

The following statement represents today's date:

#example.php

<?php
$today = date("d/m/Y");
echo $today;
?>

Note: The PHP date() function returns the current date and time according to the built-in clock of the webserver