title: First Tuesday PHP
body: <p>The <code>first_tuesday()</code> function should return the date of the first Tuesday of year, but especially in the case of 2011 it returns a wrong value. how to Fix the code so it works in all cases</p>
  
  <pre><code>function first_tuesday($year){
  
      $first_january = mktime(0,0,0,1,1,$year);
      $day_week = date("w",$first_january );
      $first_tuesday = $first_jan + ((2 - $day_week) % 7)* 86400;
      return date("d/m/Y",$first_tuesday);
  }
  </code></pre>