title: Can I make a div change its background color based on the value inside it?
body: <p>I have a PHP index page where data from an array is being displayed inside <code>&lt;div&gt;</code>'s on top of a picture. I want the <code>&lt;div&gt;</code>'s to change color based on the content inside it.</p>
  
  <p>The idea is this:  </p>
  
  <pre><code>I have Customer   -    Date    -    Due in
  </code></pre>
  
  <p>The array I mean has a structure like the following:</p>
  
  <pre><code>Array(
     [0] =&gt; array('customer' =&gt; 'John', 'date' =&gt; '2012-05-11', 'due' =&gt; 9),
     [1] =&gt; array('customer' =&gt; 'Hess', 'date' =&gt; '2011-12-11', 'due' =&gt; 5),
     [2] =&gt; array('customer' =&gt; 'Mrac', 'date' =&gt; '2012-06-18', 'due' =&gt; 3)
  )
  </code></pre>
  
  <p>Due in shows a number of days - I want the <code>&lt;div&gt;</code> to be red if the number inside it is 5 or lower.</p>
  
  <p>Any help would be greatly appreciated.</p>