1.

Which one of the following function is useful for producing a timestamp based on a given date and time?(a) time()(b) mktime()(c) mrtime()(d) mtime()The question was posed to me by my school principal while I was bunking the class.Query is from Date and Timestamp topic in portion File and Session Handling in PHP of PHP

Answer»

The correct choice is (b) mktime()

Easiest explanation: The function mktime() returns the UNIX timestamp for a DATE. This function is same as gmmktime() except that the passed parameters represents a date not a GMT date.



Discussion

No Comment Found

Related InterviewSolutions