title: PHP Updating Array of Dates but exclude Weekends (Saturday and Sunday)
body: <p>I'm looping through an array of days in the current month to generate another array of days that are on or after the current day and this is working well. I now need to exclude/omit any dates if they are a Saturday or a Sunday.</p>
  
  <p>I'm trying to work out if it's possible to include a check for Saturday/Sunday dates, something like:</p>
  
  <pre><code>date('N', strtotime($day)) &gt;= 6);
  </code></pre>
  
  <p>with my existing code that generates an array:</p>
  
  <pre><code>// Get days for current month
      $day = date("Y-m-d");
      $i = strtotime($day);
  
      array("year" =&gt; array("month" =&gt; array(days)));
      $allDays = array(
          date('Y', $i) =&gt; array(
              date('n') =&gt; range(date('d', $i), intval(date('t'))),
          ),
      );
  </code></pre>
  
  <p>Not sure how to combine the test for a weekend date with this or whether I need to use a forloop etc here?</p>