Lab # 3
FUNCTIONS
date time functions

5. Write PHP script to display date formats using date-time functions.

Lab-3-5-date-time-functions.php


1
2
3
4
5
<?php
    echo "Using date(): ".date("d/M/y")."<br>";
    echo "Using time(): ".date("d/m/y",time())."<br>";
    echo "Using mktime(): ".date("d/m/y",mktime(0,0,0,20,7,2018));
?>

Output
date time function output
Date Time Function

Happy Coding :)

VISIT: https://codesnail.com