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 difference between base_url and site_url?
What exactly is PHP?
How do I install php and apache on windows 10?
What is session data?
What can I do by cakePHP?
How many php functions are there?
What would occur if a fatal error was thrown in your php program?
How to create a table using php?
Echo is used to Display message on screen. Which is used with echo to not output the trailing newline?
What is the function mysql_pconnect() useful for?
What is the meaning of ‘escaping to php’?
List out different arguments in PHP header function?