<?php
echo "Current Date and Time: " . date("Y-m-d H:i:s");
?>
- The script uses the
date
function to get the current date and time. - The format "Y-m-d H:i:s" represents the year, month, day, hour, minute, and second.
<?php
echo "Current Date and Time: " . date("Y-m-d H:i:s");
?>
date
function to get the current date and time.
Related
How to reverses a given string using PHP. |
Create a PHP script that prints the current date and time. |
Write a PHP script that calculates the sum of digits in a given number. |
Write a PHP function that throws a custom exception if a condition is not met. |
How to convert a temperature from Celsius to Fahrenheit using php. |
How to show location using google map in JavaScript? |
Create a PHP script that counts the number of occurrences of each word in a given sentence. |
how to get country, state and city select option using google map api in php |