- Instant help with your Php coding problems

Get actual date in PHP

Question:
How to get actual date in PHP?
Answer:
$actualDate = date('Y-m-d');
Description:

To get the actual date also known as today's date use the date() function that returns a string formatted according to the given format string using the given integer timestamp or the current time if no timestamp is given.

Syntax: date ( string $format [, int $timestamp = time() ] ) : string

Reference:
The date reference
Share "How to get actual date in PHP?"
Interesting things
ChatGPT in a nutshell