title: Odd Date("Y-m-d") result
body: <p>Im having some bizarre results in regards to the php date() function. Basically Im getting a date from a Mysql database which is in a string format, split into three elements. This would be Day, Month, Year (15 september 2012 for example) Im ultimately comparing two dates to see if it has expired. But the issue is that only certain dates are allowing the code to work, and some do not work at all (or allow the if statement to work effectively) Below is my code, any help would be great.  </p>
  
  <pre><code> $today = date("d-m-Y");
  
  $expire = date("d-m-Y",strtotime($this-&gt;getData('date_day')."-".
  $this-&gt;getData('date_month')."-".$this-&gt;getData('date_year'))) ;
  
   if ($expire &lt; $today)
  {
      echo 'expired';
  }
  else
  {
      echo 'Not expired';
  }
  </code></pre>
  
  <p>Im sure its something simple, but for some reason I cannot solve it.</p>