how many ways we get current date in php
Answers were Sorted based on User's Feedback
Answer / swapna
$date_time = date('Y-m-d H:i:s'); use this one you can get
current date.
| Is This Answer Correct ? | 88 Yes | 28 No |
Answer / mahesh
$date = getdate()
Here $date prints as an Array.with current date and Time
| Is This Answer Correct ? | 24 Yes | 25 No |
Answer / tasimkhan
$date = date('d-M-Y H:i:s', strtotime(time(0))
| Is This Answer Correct ? | 4 Yes | 7 No |
What is ci framework in php?
Can php run without apache?
How can we take a backup of a mysql table and how can we restore it. ?
7 Answers Brain Infosys, Oracle,
What is purpose of @ in Php?
What is call by reference in php?
What are magic methods?
how to set session expire(session timeout) using php code
Tell me how to execute an sql query? How to fetch its result?
What is the scope of career in PHP/Mysql
how php works with oracle?
What is die in php?
What is a closure in php?