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
or the current time if no timestamp is given.timestamp
Syntax: date ( string
$format
[, int $timestamp
= time() ] ) : string
Reference:
The date reference
Share "How to get actual date in PHP?"
Related snippets:
- Add minutes to date time in PHP
- Add days to date in PHP
- Get same day in the next week in PHP
- Get time difference in minutes in PHP
- Convert date to timestamp in PHP
- Convert timestamp to DateTime in PHP
- Get the last day of a month from date in PHP
- Get the number of days between two dates in PHP
- Get yesterday's date in PHP
- Get tomorrow's date in PHP
- Get current time in PHP
- Get actual date in PHP
Tags:
actual date, today's date, get actual dat php, get today's date php, actual, today, date, php Technical term:
Get actual date in PHP