Php Get Today Date - Php

How to get today date using php code?

Snippet Code


  
Rate this page :
  [ 0 votes]

This code can be used to get the today date. Operators y-m-d (or) Y-M-D can be used to get the current date in different formats. If you use "y-m-d" code, the output will be 15-06-23 and if you use "Y-M-D" code, the output will be in 2015-Jun-Tue format.

<?php echo date('y-m-d'); echo "</br>"; echo date('Y-M-D'); ?>

Tags


Ask Questions

Ask Question