php date with day date and year code example
Example 1: php date
$dateTime = new \DateTime();
/**
* You can get the string by using format
*/
$dateTime->format('Y-m-d H:i:s');
Example 2: show date php
check here link: http://www.eltcalendar.com/stuff/datemysqlphp.html