get day and month php code example
Example 1: datetime get month php
$dateTime = new DateTime();
$month = $dateTime->format('m');
Example 2: get day from date php
// Prints the day
echo date("l") . "<br>";
$dateTime = new DateTime();
$month = $dateTime->format('m');
// Prints the day
echo date("l") . "<br>";