PHP Get Date and Time
To get the current date and time, the
function date is used.
Let's output the current date-time in the format
'year-month-day hours:minutes:seconds':
<?php
echo date('Y-m-d H:i:s');
?>
To get the current date and time, the
function date is used.
Let's output the current date-time in the format
'year-month-day hours:minutes:seconds':
<?php
echo date('Y-m-d H:i:s');
?>