php 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: date now php
date('Y-m-d H:i:s')
Example 3: php format date
<?php
$old_date_format = "20/03/1999";
$new_data_format = date("Y-m-d H:i:s", strtotime($old_date_format));
Example 4: php now
$new_time = date("Y-m-d H:i:s", strtotime('+2 hours'));
Example 5: date now php
date("Y-m-d H:i:s");
Example 6: php get current datetime mysql format
date('Y-m-d H:i:s');