Answers for "how to get current time and date php"

PHP
2

php current time

echo date('Y-m-d H:i:s');

//Output something like this:
//2021-07-30 10:07:45
Posted by: Guest on July-30-2021
0

Get the Current Date and Time in PHP

phpCopy<?php
$DateAndTime = date('m-d-Y h:i:s a', time());  
echo "The current date and time are $DateAndTime.";
?>
Posted by: Guest on April-23-2021

Code answers related to "how to get current time and date php"

Browse Popular Code Answers by Language