set data range php
<p>i have a list with some days listed in a table, so , my database result come like this:</p>

<pre><code>$day   = $res-&gt;fields['DAY'];

$month = $res-&gt;fields['MONTH'];

$year  = $res-&gt;fields['YEAR'];
</code></pre>

<p>and i put they all together to form a valid date</p>

<pre><code>// put together the date
$date    = $res-&gt;fields['DAY']."/".$res-&gt;fields['MONTH']."/".$res-&gt;fields['YEAR'];     

// get the present day
$today   = date('d/m/Y');  // 28/10/2011
</code></pre>

<p>and i check:</p>

<pre><code>if($date == $today){
   $backGroundTr = "red";
}
</code></pre>

<p>setting a <code>&lt;tr&gt;</code> background red.</p>

<p>the html is something like this:</p>

<pre><code>&lt;tr bgcolor="green"&gt;
   &lt;td&gt;31/10/2011&lt;/td&gt;
&lt;/tr&gt;
&lt;tr bgcolor="green"&gt;
   &lt;td&gt;30/10/2011&lt;/td&gt;
&lt;/tr&gt;
&lt;tr bgcolor="green"&gt;
   &lt;td&gt;29/10/2011&lt;/td&gt;
&lt;/tr&gt;
&lt;tr bgcolor="red"&gt; // this reciave the red bgcolor because is today
   &lt;td&gt;28/10/2011&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>now, what i'm trying to do is:</p>

<p>how can i set other color to the next 3 days ? as u can see in the example, i put the green color.</p>

<p>dont know if i was clear, any question, please, be my guest</p>
