Friday, 13 April 2018

How to Print Date and Time in PhP?


Program:-

<?php
//    Day/month/year
$date = date(‘d/m/y’);
echo  $date.'<br>’;
     //  Hours/Mintus/Seconds
$time = date(‘H:m:s’);
echo  $time;
?>

OUTPUT:-
7/08/2017
03:52:51

1 comment:

Popular Posts

Categories

Android (21) AngularJS (1) Assembly Language (1) Books (10) C (75) C# (4) C++ (81) Data Strucures (4) Downloads (1) Engineering (13) FPL (17) Hadoop (1) HTML&CSS (38) IS (25) Java (87) Leet Code (4) PHP (20) Python (211) R (69) Selenium Webdriver (2) Software (14) SQL (27)