8.6k views
4 votes
Date() is a function that can also access time.

Select one:

a. False

b. None of these

c. True

d. Sometimes

1 Answer

3 votes

Answer:

c. True

Step-by-step explanation:

The Date() function in PHP can also be used to access current time.

Syntax of date function is date(format, timestamp). Here timestamp is optional argument. If it is omitted it defaults to the current date/time.

In order to print current time using the date() function:

echo date("h:i:s")

This will display the current time in hour:minute:second format.

hours range from 01-12

minutes range from 00-59

seconds range from 00-59

User Ruakh
by
6.5k points