NOW() function in PHP


Question

Is there a PHP function that returns the date and time in the same format as the MySQL function NOW()?

I know how to do it using date(), but I am asking if there is a function only for this.

For example, to return:

2009-12-01 00:00:00
1
451
7/13/2019 6:03:45 PM

Accepted Answer

Not besides:

date("Y-m-d H:i:s");
952
11/26/2018 3:47:07 PM

date('Y-m-d H:i:s')

Look here for more details: http://pl.php.net/manual/en/function.date.php


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon