Vidyalelo
PHP · Q9

Date And Timestamp

Programming · PHP · question 9

Q9

Say you want to calculate the date 45 days from the present date which one of the following statement will you use?

A.
totime(“+45”)
B.
totime(“+45 days”)
C.
strtotime(“+45 days”)
Answer
D.
strtotime(“-45 days”)

Answer: Option C

Solution

Answer: Option C
Solution:
The strtotime() function and GNU date syntax is used to calculating the date x days from the present date.