php date from now code example
Example 1: php get current date and time
$today = date("F j, Y, g:i a");
$today = date("D M j G:i:s T Y");
$today = date("Y-m-d H:i:s");
Example 2: php all date formats
<?php
echo date("F j, Y, g:i a")."<br>";
echo date("m.d.y")."<br>";
echo date("j, n, Y")."<br>";
echo date("Ymd")."<br>";
echo date('h-i-s, j-m-y, it is w Day')."<br>";
echo date('\i\t \i\s \t\h\e jS \d\a\y.')."<br>";
echo date("D M j G:i:s T Y")."<br>";
echo date('H:m:s \m \i\s\ \m\o\n\t\h')."<br>";
echo date("H:i:s")."<br>";
echo date("Y-m-d H:i:s")."<br>";