title: How Do I Change the Background of a Cell based on Value
body: <pre><code>&lt;?php
  
    try
  
    {
  
  $db = new PDO("sqlite:/var/www/html/mobile_app.db");
  
  print "&lt;table border=1&gt;";
  print "&lt;tr&gt;&lt;td&gt;Game ID&lt;/td&gt;&lt;td&gt;Game Name&lt;/td&gt;&lt;td&gt;Approved Version&lt;/td&gt;&lt;td&gt;Current Version&lt;/td&gt;&lt;td&gt;Status&lt;/td&gt;&lt;td&gt;Date Checked&lt;/td&gt;&lt;td&gt;Date Changed&lt;/td&gt;&lt;/tr&gt;";
  $result = $db-&gt;query('SELECT * FROM mobile_version');
  foreach($result as $row)
  {
    print "&lt;tr&gt;&lt;td&gt;".$row['gameid']."&lt;/td&gt;";
    print "&lt;td&gt;".$row['game_name']."&lt;/td&gt;";
    print "&lt;td&gt;".$row['approved_version']."&lt;/td&gt;";
    print "&lt;td&gt;".$row['current_version']."&lt;/td&gt;";
    print "&lt;td&gt;".$row['status']."&lt;/td&gt;";
    print "&lt;td&gt;".$row['date_checked']."&lt;/td&gt;";
    print "&lt;td&gt;".$row['date_changed']."&lt;/td&gt;";
  }
  print "&lt;/table&gt;";
  $db = NULL;
  }
  catch(PDOException $e) {
    echo $e-&gt;getMessage();
  }
  ?&gt;
  </code></pre>
  
  <p>My aim is to change just the cell with the data in column 'status'.  Red if it equals UNAPPROVED and green if it equals APPROVED.  Any help would be awesome!  Data is in a single table in an sqlite3 database.</p>