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 are the types of variables in php?
How to create an array of a group of items inside an html form?
What is php compared to html?
How to remove blank spaces from the string?
What is return in php function?
What is mvc php?
Which cryptographic extension provide generation and verification of digital signatures?
What is the use of mysql_real_escape_string() function?
Why php is better?
What types images that php supports?
What is meant by an associative array?
•How to upload files using PHP?