Which is the correct PHP statement to print the current date in DD-MON-YYY format?

134. Which is the correct PHP statement to print the current date in DD-MON-YYY format?

  1. <?php echo date("DD-MON-YYYY"); ?>
  2. <?php echo date("dd-mon-yyyy"); ?>
  3. <?php echo date("d-m-y"); ?>
  4. <?php echo date("d-M-Y"); ?>

Answer: D) <?php echo date("d-M-Y"); ?>

Explanation:

The correct PHP statement to print the current date in DD-MON-YYYY format is:

<?php echo date("d-M-Y"); ?>

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.