Php program to print the date

Php program to print the date. The date() function’s required format parameter specifies how to format the date.

<!DOCTYPE html>
<html>
<body>

<?php
echo "Today is " . date("Y/m/d") . "<br>";
echo "Today is " . date("l");
?>

</body>
</html>

 

Output:

Today is 2021/09/08
Today is Wednesday

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *