Is there a PHP function that returns the date and time in the same format as the MySQL function NOW()?
NOW()
I know how to do it using date(), b
date()
With PHP version >= 5.4 DateTime can do this:-
echo (new \DateTime())->format('Y-m-d H:i:s');
See it working.