How to show date in PHP

Show date in PHP

PHP date() function :

PHP output :
Current Date: 11/04/17

<?php
            $date = date(“d/m/y”);
            echo “Current Date: $date”;
?>

PHP output :
Current Date: Tue/04/2017

<?php
            $date = date(“D/m/y”);
            echo “Current Date: $date”;
?>

PHP output :
Current Date: Tue/Apr/17

<?php
            $date = date(“D/M/y”);
            echo “Current Date: $date”;
?>

PHP output :
Current Date: Tue/Apr/2017

<?php
          $date = date(“D/M/Y”);
          echo “Current Date: $date”;
?>

By Table

Code :
Output :
<?php
            $date = date(“d/m/y”);
            echo “Current Date: $date”;
?>
Current Date: 11/04/17
<?php
            $date = date(“D/m/y”);
            echo “Current Date: $date”;
?>
Current Date: Tue/04/2017
<?php
            $date = date(“D/M/y”);
            echo “Current Date: $date”;
?>
Current Date: Tue/Apr/17
<?php
          $date = date(“D/M/Y”);
          echo “Current Date: $date”;
?>
Current Date: Tue/Apr/2017

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *