Source Code and Output to Get, Assign and print Current Date and Time
<?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
Source Code and Output to Get, Assign and print Current Date and Time
Output
need an explanation for this answer? contact us directly to get an explanation for this answer