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 do the initials of php stand for?
What is meant by session in php?
How do I open a file to write content to?
1 Answers Rushmore Consultancy,
What type of headers that PHP supports?
What is cookie and session in php?
What is PHP? Who is the father or inventor of PHP?
What are classes in php?
How to create a table using php?
How does api connect to database?
How can I execute a PHP script using command line?
How do you create an array in php?
How to apply Cake php ajax pagination?