Date Functions

Posted: December 16, 2014 in Functions

The PHP date() function is used to format a time or date.
Syntax : date(format,timestamp)


<?php

// Prints something like: Monday 8th of August 2005 03:12:46 PM

echo date('l jS \of F Y h:i:s A');

?>

  • ex.
    <?php echo date("d"); ?>


    Output: ??
  • Leave a comment