PHP date functions

PHP strtotime() function

What is the syntax of the strtotime() function in PHP? Parameter Description time Required. Specifies a date/time string now Optional. Specifies the timestamp used as a base for the calculation of relative dates Examples of the strtotime() function Example 1. In this example,

PHP strptime() function

What is the syntax of the strptime() function in PHP? Parameter Description date Required. The string to parse (e.g. returned from strftime()) format Required. Specifies the format used in the date: Examples of the strptime() function Example 1. In this example,

PHP strftime() function

What is the syntax of the strftime() function in PHP? Parameter Description format Required. Specifies how to return the result: timestamp Optional. Specifies a Unix timestamp that represents the date and/or time to be formatted. Default is the current local time (time()) Examples of the strftime() function Example 1. In this example,

PHP mktime() function

What is the syntax of the mktime() function in PHP? Parameter Description hour Optional. Specifies the hour minute Optional. Specifies the minute second Optional. Specifies the second month Optional. Specifies the month day Optional. Specifies the day year Optional. Specifies the year is_dst Optional. Set this parameter to 1 if the time is during daylight …

PHP mktime() function Read More »

en English
X
Scroll to Top