Write a PHP Program to display the today’s date and Current time.




Write a PHP Program to display the today’s date and Current time.

<!DOCTYPE html>
<html>
<head>
          <title>Practical-2</title>
</head>
<body>
<?php
print strftime('%c');
echo"</br>";
print strftime('%d/%m/%Y');
echo "</br>";
print strftime('%A,%d,%B-%Y');
echo "</br>";
echo "<b>Current Day,Date And Time is:</b>".date("D M d,Y G:i A");
?>
</body>
</html>

OUTPUT:-

02/04/20 06:53:54
04/02/2020
Tuesday,04,February-2020
Current Day,Date And Time is:Tue Feb 04,2020 6:53 AM

Comments