Highlighting newest post until a certain date
<p>I'm trying to use DateTime to determine how long a newly posted comic should stay highlighted for. So, my goal is to have the latest comic "highlighted" for 2 days, then go back to regular (gray, like the rest).</p>

<p><strong>Note</strong>: this is a question I've asked before. I'm restating it because the previous question was becoming quite confusing for people. So I reworked the code, simplified my question, and am re-asking.</p>

<p><img src="http://i.stack.imgur.com/Lo8Ta.jpg" alt="enter image description here"></p>

<p><strong>My logic:</strong></p>

<pre><code>Loop through all comics {
   if comic date &gt;= current date, display that comic with highlight CSS tag, 

   else display it with normal CSS tag.
}
</code></pre>

<p><strong>My code:</strong> I'm wondering why this isn't working... it's not even displaying the latest comic (whose date > current_date).</p>

<pre><code>        $desc = (isset($_GET['description']) ? ($_GET['description']) : null);  


    $row = $catResult-&gt;fetch_assoc();

    $current_date = new DateTime;
    echo "Current Date: " . $current_date-&gt;format('Y-m-d H:i:s');

    //$comic_date-&gt;modify('3 day');

    //DISPLAY IMAGES TO CORRECT PAGE FROM DATABASE  

            echo '&lt;ul&gt;';
        $imageCounter = 0;
        while (($imageCounter &lt; $imagesPerPage) &amp;&amp; ($row = $catResult-&gt;fetch_assoc())) {

            $comic_date = new DateTime($row['date']);

            $class = ($comic_date &gt;= $current_date) ? 'newcomics' : 'comics';   
                echo '&lt;li&gt;';                
                    echo        '&lt;span class="' . $class . '"&gt;&lt;a href=".?action=viewimage&amp;site='.$site. '&amp;id=' . $row['id'] .'" title="' . $row['description'] . '" alt="' . $row['title'] . '"&gt;
                                &lt;img src="./scripts/thumber.php?img=.' . $thumbpath.$row['thumb'] . '&amp;mw=220&amp;mh=220"/&gt;&lt;/a&gt; 
                                &lt;br /&gt;&lt;br /&gt; ' . $row['description'] . $row['date'] . '&lt;/span&gt;';                                
                    $imageCounter++;
                echo '&lt;/li&gt;';


            }   
        echo '&lt;/ul&gt;';   
</code></pre>

<p>Any thoughts?</p>
