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 the difference between indexed and associative array?
What is the best way to change the key without changing the value of a php array element?
Can php replace javascript?
What are some new features introduced in php7?
What is the use of array_search() in php?
What is php ci?
What is a controller in php?
How to use validations in php?(codelgniter)
Explain the importance of the function htmlentities.
Tell me what kind of things have you done on the social side?
Does php have block scope?
What is symfony php?