I need help with that exercise, it's a web application with php . It has to be POO
Make an application that receives two dates and shows a list of the dates included in that range, showing the last day of each month of RED color.
I'm doing tests with this code but I do not know how to condition if it's the end of the month to put it in red
<?php
$hoy1=new DateTime("01-01-2018");
$fin=new DateTime("01-10-2018");
echo "<font color=#FF0000>"."ultimo día del mes es: 1"."</font>"."<br>";
for ($i=$hoy1; $i <$fin ; $i++) {
# code...
echo $hoy1->format('d-m-Y')."<br>";
$hoy1->modify('+1 days');
}
?>