1
Someone can give me a hand here, I made this train to take the weekdays, until all right, plus the foreach($periodo as $item) don’t list the last day, someone can tell me what I’m doing wrong!
$ini = new DateTime('2019-02-01');
$fim = new DateTime('2019-02-28');
$periodo = new DatePeriod($ini, new DateInterval('P1D'), $fim);
foreach($periodo as $item){
if(substr($item->format("D"), 0, 1) != 'S'){
echo $item->format('d/m/Y') . " - " . $item->format("N") . " - " . $item->format("D") . "<br>";
if($item->format("N") == 5){
echo "<br><br>";
}
}
}
Perfect, thanks even, graduated
– Marcos C. Anzolin
Hello @Marcosc.Anzolin. If the answer was useful and correct, mark it as such! Why it is important to vote?
– João Martins