How to compare two dates in php and echo newer one?
<p><strong>How to compare two dates in php and echo newer one?</strong></p>

<p>My dates are in the following format: <code>date("F j, Y, g:i a");</code> which give us <code>August 12, 2011, 9:45 am</code>.</p>

<p>My dates are as follow:</p>

<ul>
<li>date 1 <code>$created</code></li>
<li>date 2 <code>$updated</code> / if no updated have been made value is <code>0000-00-00 00:00:00</code></li>
</ul>

<p>Any suggestion much appreciated. </p>
