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 |
How to initiate a session in php?
What is polymorphism?
Explain about the data types in PHP?
What is foreach loop in php?
what is variable scope, which variables are accessible from where and what are "undefined variable" errors?
how to get the value in script values
What is the difference between substr() and strstr()?
which function used to get the file name in php?
Is it possible to get the screen resolution and like with php?
What is rest api in php?
Tell me what does the php error 'parse error in php - unexpected t_variable at line x' means?
why did u want to leave your past organisation?