PHP Program to assign and print the current date time in variables
<?php
$cur_date = date("D, d M Y");
$cur_time = date("h:i:s a");
/*print values of cur_date and cur_time*/
printf("Current date is: " . $cur_date);
print "</br>";
printf("Current time is: " . $cur_time);
print "</br>";
?>
Output
Current date is: Tue, 08 Nov 2016
Current time is: 02:33:48 pm
