Kamal rajput Kamal rajput - 1 year ago 63
PHP Question

How can i write a php code for getting a time and then fix it

i am building a blog in PHP and for every post i want to mention comments. But how can i show the comments time in PHP so that people can find out on which time the comment is being made.

Answer Source

You are likely going to store comments in database.

You can use mysql functions like:

NOW()                      CURDATE()    CURTIME()
2014-11-22 12:45:34       2014-11-22    12:45:34