Which is the correct PHP statement to print the current time in the format of hour:minutes:seconds(am/pm) i.e., 10:22:54pm?

136. Which is the correct PHP statement to print the current time in the format of hour:minutes:seconds(am/pm) i.e., 10:22:54pm?

  1. <?php echo date("h:i:sa");?>
  2. <?php echo date("h:m:sa");?>
  3. <?php echo date("h:mi:sa");?>
  4. <?php echo date("hh:min:sa");?>

Answer: A) <?php echo date("h:i:sa");?>

Explanation:

The correct PHP statement to print the current time in the format of hour:minutes:seconds(am/pm) i.e., 10:22:54pm is:

<?php echo date("h:i:sa");?>

Comments and Discussions!

Load comments ↻






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