Change <td> background color in PHP using CSS : <p>I have the following PHP code that fill table from mySQL database</p>

<pre><code>&lt;?php               
     while($res = mysqli_fetch_array($result)) {         
         echo "&lt;tr&gt;";
         echo "&lt;td&gt;".$res['id']."&lt;/td&gt;";
         echo "&lt;td&gt;".$res['name']."&lt;/td&gt;";
         echo "&lt;td&gt;".$res['number']."&lt;/td&gt;";
         echo "&lt;td&gt;".$res['nid']."&lt;/td&gt;";     
 }
 ?&gt;  
</code></pre>

<p>Using CSS, How can I change background color for <strong>nid</strong> field?</p>

<p>I'm has trying the below, but it doesn't work:</p>

<pre><code>echo "&lt;td style="background-color:red" &gt;".$res['nid']."&lt;/td&gt;";
</code></pre>
