Such a task is necessary to display the current date before the same date of the next month, that is, for a month in advance. I did something, but I got the feeling that I was bewildered, if there is a better option, please prompt.
<div class="tbody"> <?php if(!empty($users)) : foreach($users as $user) : ?> <div class="tr"> <div class="td"> <div class="wrapp-img"> <img src="/assets/images/photo1.jpg" alt=""> </div> <h4> <?php echo $user['first_name'].' '.$user['second_name']; ?> </h4> <p>Project Manager</p> </div> <?php for($i = 0; $i <= $days_month; $i++) : $day = date('j', strtotime($i.'days')); $dayOfWeek = date('N', strtotime($i.'days')); $weekend = $dayOfWeek == 6 || $dayOfWeek == 7 ? 'holiday-0' : ''; ?> <div class="td <?php echo $weekend; ?>"> <a href='#modal-1' class=' modal-trigger disabled' data-modal="modal-1"> <?php echo $day; ?> </a> </div> <?php endfor; ?> </div> <?php endforeach; endif; ?> </div>