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 a Persistent Cookie?
How will you create a bi-lingual site (multiple languages) ?
How is session data stored?
Why does php need server?
What is return value in php?
What is filter_var?
How can I find what type of images that the PHP version supports?
What are the different types of errors in PHP?
How can we display information of a variable and readable by a human with php?
Write a program to display table of a number using php?
How to delete file in php?
What is $_ env in php?