title: Highlighting a cell PHP a certain color based on MYSQL value
body: <p>I have three values that can be displayed from a <strong>table/column in mysql</strong>, RED, GREEN, YELLOW for the field "ProspectStatus"</p>
  
  <p>Is there anyway I can make a cell change its background color based on the value?</p>
  
  <p>e.g.</p>
  
  <pre><code>echo "&lt;td&gt;" . $row['ProspectStatus'] . "&lt;/td&gt;";
  </code></pre>
  
  <p>PHP Code:</p>
  
  <pre><code> $result = mysql_query("SELECT * FROM customerdetails"); 
  //List the Columns for the Report 
  echo "&lt;table border='1'&gt; 
  &lt;tr&gt; 
  &lt;th&gt;CustomerID&lt;/th&gt; 
  &lt;th&gt;Customer Name&lt;/th&gt; 
  &lt;th&gt;Prospect Status&lt;/th&gt; 
  &lt;th&gt;Address&lt;/th&gt; 
  &lt;/tr&gt;"; 
  
  while($row = mysql_fetch_array($result)) 
    { 
    echo "&lt;tr&gt;"; 
    echo "&lt;td&gt;" . $row['CustomerID'] . "&lt;/td&gt;"; 
    echo "&lt;td&gt;" . $row['CustomerName'] . "&lt;/td&gt;"; 
    echo "&lt;td&gt;" . $row['ProspectStatus'] . "&lt;/td&gt;"; //this is the field I want to show either RED, GREEN or YELLOW 
    echo "&lt;td&gt;" . $row['Address'] . "&lt;/td&gt;"; 
    echo "&lt;/tr&gt;"; 
    } 
  echo "&lt;/table&gt;";  
  </code></pre>