If statements comparison integers
<p>I have some if statements that read a variable from my mysql database and then echo out a number based on that variable.  For some reason, the code below only echos out "1"  and I dont know why.  ($x is 670, but it still echos out 1)</p>

<p>CODE:</p>

<pre><code> //connect to database and assign $x a int from database
 if ($x&lt;=100){
 echo 1;
 }

 if ($x&gt;=500 &amp;&amp; $x&lt;1000){
 echo 2;
 }

 if ($x&gt;=1000 &amp;&amp; $x&lt;2500){
 echo 3;
 }

 if ($x&gt;=2500 &amp;&amp; $x&lt;5000){
 echo 4;
  }

 if ($x&gt;=5000 &amp;&amp; $x&lt;7500){
 echo 5;
 }

 if ($x&gt;=7500  &amp;&amp; $x&lt;100000){
  echo 6;
 }

 if ($x&gt;=10000){
 echo 7;
 }
</code></pre>

<p>EDIT: I did something stupid in my code with connecting to the DB.  Thanks for your help anyway.  I appreciate it.</p>
