title: json and php If, else statement
body: <p>This php code generates a table with some information like: temperature, water health, ph level and other things ...     </p>
  
  <pre><code>if (count($auxGateway-&gt;getMaquina()) &gt; 0)
  {
      foreach($auxGateway-&gt;getMaquina() as $maq)
      {
          echo '&lt;div class="cont-maq-uni"&gt;';//Cria a div para cada maquina
          echo '  &lt;table class="maq"&gt;';//Cria uma tabela
          echo '      &lt;tr&gt;';
          echo '          &lt;td colspan="2"&gt;';
          echo '              &lt;h2 class="maq-head"&gt;'.$maq-&gt;getNome().'&lt;/h2&gt;';
          echo '          &lt;/td&gt;';
          echo '      &lt;/tr&gt;';
          foreach($maq-&gt;getVariavel() as $var)
          {
              echo '  &lt;tr class="maq"&gt;';
              echo '      &lt;td class="maq"&gt;';
              echo '          &lt;p class="n_font maq"&gt;'.$var-&gt;getNome().'&lt;/p&gt;';
              echo '      &lt;/td&gt;';
              echo '      &lt;td class="maq"&gt;';
              echo '          &lt;p class="n_font maq"&gt;'.(floatval($var-&gt;getValor()) * floatval($var-&gt;getMultiplicador()) + floatval($var-&gt;getSomador())).' '.$var-&gt;getUnidadeValor().'&lt;/p&gt;';
              echo '      &lt;/td&gt;';
              echo '  &lt;/tr&gt;';
          }
          echo '  &lt;/table&gt;';
          echo '&lt;/div&gt;'; 
      }
  }
  </code></pre>
  
  <p>so I need to create a code to show some images if that information is bigger or less. For example: if 'temperature' &lt;30 then it will show the image (notgood.jpeg). The problem is: how do I name these values since they are inside the MYSQL database? How will I name each row in the table?</p>
  
  <p>Thank you guys!</p>