how many ways we get current date in php

Answers were Sorted based on User's Feedback



how many ways we get current date in php..

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

how many ways we get current date in php..

Answer / rohit

echo date("d-M-Y",time());

Is This Answer Correct ?    51 Yes 9 No

how many ways we get current date in php..

Answer / swapna

CURRENT_TIMESTAMP

Is This Answer Correct ?    33 Yes 21 No

how many ways we get current date in php..

Answer / rakesh dongarwar

echo $date = date("d/m/Y");

Is This Answer Correct ?    13 Yes 4 No

how many ways we get current date in php..

Answer / susmitha

$current_date=date('Y-m-d')

Is This Answer Correct ?    3 Yes 2 No

how many ways we get current date in php..

Answer / mahesh

$date = getdate()
Here $date prints as an Array.with current date and Time

Is This Answer Correct ?    24 Yes 25 No

how many ways we get current date in php..

Answer / l santosh

$date=date('Y-m-d H:i')

Is This Answer Correct ?    4 Yes 5 No

how many ways we get current date in php..

Answer / divyeshnimavat

$currtime = time();

Is This Answer Correct ?    17 Yes 19 No

how many ways we get current date in php..

Answer / tasimkhan

$date = date('d-M-Y H:i:s', strtotime(time(0))

Is This Answer Correct ?    4 Yes 7 No

Post New Answer

More PHP Interview Questions

What are the types of variables in php?

0 Answers  


How to create an array of a group of items inside an html form?

0 Answers  


What is php compared to html?

0 Answers  


How to remove blank spaces from the string?

0 Answers  


What is return in php function?

0 Answers  


What is mvc php?

0 Answers  


Which cryptographic extension provide generation and verification of digital signatures?

0 Answers  


What is the use of mysql_real_escape_string() function?

0 Answers  


Why php is better?

0 Answers  


What types images that php supports?

1 Answers  


What is meant by an associative array?

0 Answers  


•How to upload files using PHP?

3 Answers  


Categories