title: Echo all months with days calendar
body: <p>I am using the code below to echo the current month.  How can i enhance it so that is shows all the months with the names and days and dates..</p>
  
  <p>Code:  </p>
  
  <pre><code> &lt;?php
  $today    = getdate();
  $firstDay = getdate(mktime(0,0,0,$today['mon'],1,$today['year']));
  $lastDay  = getdate(mktime(0,0,0,$today['mon']+1,0,$today['year']));
  
  
  ?&gt;
  
  &lt;?php
  
  echo '&lt;table&gt;';
  echo '  &lt;tr&gt;&lt;th colspan="7"&gt;'.$today['month']." - ".$today['year']."&lt;/th&gt;&lt;/tr&gt;";
  echo '&lt;tr class="days"&gt;';
  echo '  &lt;td&gt;Mo&lt;/td&gt;&lt;td&gt;Tu&lt;/td&gt;&lt;td&gt;We&lt;/td&gt;&lt;td&gt;Th&lt;/td&gt;';
  echo '  &lt;td&gt;Fr&lt;/td&gt;&lt;td&gt;Sa&lt;/td&gt;&lt;td&gt;Su&lt;/td&gt;&lt;/tr&gt;';
  ?&gt; 
  
  &lt;?php
  echo '&lt;tr&gt;';
  for($i=1;$i&lt;$firstDay['wday'];$i++){
      echo '&lt;td&gt;&amp;nbsp;&lt;/td&gt;';
  }
  $actday = 0;
  for($i=$firstDay['wday'];$i&lt;=7;$i++){
      $actday++;
      echo "&lt;td&gt;$actday&lt;/td&gt;";
  }
  echo '&lt;/tr&gt;';
  ?&gt; 
  
  &lt;?php
  $fullWeeks = floor(($lastDay['mday']-$actday)/7);
  
  for ($i=0;$i&lt;$fullWeeks;$i++){
      echo '&lt;tr&gt;';
      for ($j=0;$j&lt;7;$j++){
          $actday++;
          echo "&lt;td&gt;$actday&lt;/td&gt;";
      }
      echo '&lt;/tr&gt;';
      }
      ?&gt; 
  
      &lt;?php
      if ($actday &lt; $lastDay['mday']){
      echo '&lt;tr&gt;';
  
      for ($i=0; $i&lt;7;$i++){
          $actday++;
          if ($actday &lt;= $lastDay['mday']){
              echo "&lt;td&gt;$actday&lt;/td&gt;";
          }
          else {
              echo '&lt;td&gt;&amp;nbsp;&lt;/td&gt;';
          }
      }
  
      echo '&lt;/tr&gt;';
  }
  ?&gt; 
  </code></pre>