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?
date('Y-m-d H:i:s'). See the manual for more.
date('Y-m-d H:i:s')
date("Y-m-d H:i:s"); // This should do it.
I belive the answer is:
echo date('Y-m-d H:i:s');