title: php for event calendar causing me to recieve html table/body/html end tag errors from my IDE in my code
body: <p>all of the required closing tags are present, as well as function closing tags and php closing tags, I cant figure out the problem here. the errors state that Element 'table' requires end tag, Element 'body' requires end tag, and that Element 'html' requires end tag. here is the code in question: </p>
  
  <p></p>
  
  <pre><code>&lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;link rel="stylesheet" type="text/css" href="StyleSheet.css"&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;?php
      // get the today date and store them in day month year variables
      $day = date('j');
      $month = date('n');
      $year = date('Y');
  
      //calendar variable
     $currentTimeStamp = strtotime("$year-$month-$day");
     $monthName = date("F", $currentTimeStamp);
     $numDays = date("t", $currentTimeStamp);
     $counter = 0;
  
  
  
  
      ?&gt;
      &lt;table&gt;
  
          &lt;tr&gt;
              &lt;td&gt;asdf&lt;/td&gt;
              &lt;td id ="monthandyear" colspan="5"&gt;&lt;?php echo $monthName." ".$year; ?&gt;&lt;/td&gt;
              &lt;td&gt;asdf&lt;/td&gt;
  
  
          &lt;/tr&gt;
  
          &lt;tr&gt;
  
              &lt;td class="days"&gt;Sun&lt;/td&gt;
              &lt;td class="days"&gt;Mon&lt;/td&gt;
              &lt;td class="days"&gt;Tue&lt;/td&gt;
              &lt;td class="days"&gt;Wed&lt;/td&gt;
              &lt;td class="days"&gt;Thu&lt;/td&gt;
              &lt;td class="days"&gt;Fri&lt;/td&gt;
              &lt;td class="days"&gt;Sat&lt;/td&gt;
  
          &lt;/tr&gt;
  
          &lt;?php
  
              echo "&lt;tr&gt;";
  
                  for ($i = 1; $i &lt; $numDays + 1; $i++; $counter++){
                      $timeStamp = strtotime(""$year-$month-$i");
                      if ($i == 1){
                          $firstDay = date("w", $timeStamp);
                          for($j = 1; $j &lt; $firstDay + 1; $counter++){
                              echo "&lt;td&gt;&amp;nbsp&lt;/td&gt;";
                              }
  
  
                      }
                   if ($counter % 7 == 0){
                       echo "&lt;tr&gt;&lt;/tr&gt;"; }
  
                   echo "&lt;td align = 'center'&gt;".$i."&lt;/td&gt;";
  
                  }
  
              echo "&lt;/tr&gt;";
  
          ?&gt;
    &lt;/table&gt; 
  
  &lt;/body&gt;
  &lt;/html&gt;            
  </code></pre>