PHP: Date larger than current date
<p>I have this code:</p>

<pre><code>$curdate = '22-02-2011';

$mydate = '10-10-2011';                     

if($curdate &gt; $mydate)
{
    echo '&lt;span class="status expired"&gt;Expired&lt;/span&gt;';
}
</code></pre>

<p>This would echo expired BUT shouldn't because $mydate is in the future and therefore smaller than the $curdate but PHP is looking at JUST the first two numbers 22 and 10 instead of the whole string. How can I fix this?</p>

<p>Thanks</p>
