Source Code:
(back to article)
<?php $timestamp = time(); // get the current timestamp $date = date('Y-m-d H:i:s', $timestamp); // format the timestamp as a string in the desired format echo $date; // output the formatted date and time ?>
Result:
Report an issue