How to find current date and time in PHP?

25 Views

How to find current date and time in PHP?

By using php date() function we can find the current date and time.

 <?php

echo date(“d-m-Y”); //This will print today date.

echo date (“d-m-Y h:i:s”) // This will print today’s date with current time.

?>

 

Tags:-
PHP