2011-03-04 21:00:40
I want to get current date and time in the above format. How do I do this in PHP?
This question is related to
php
date('Y-m-d H:i:s')
. See the manual for more.
I belive the answer is:
echo date('Y-m-d H:i:s');
date("Y-m-d H:i:s"); // This should do it.
Source: Stackoverflow.com