title: Giving text labels to integer ranges in PHP
body: <p>I am attempting to take simple number ranges (in the example of this project, I am working with different increments of money for each user. FAKE money, by the way...) and group them into classes that can be displayed publicly instead of the absolute number.</p>
  
  <p>Here is a rough sample of code for the long way to write this function as an example:</p>
  
  <pre><code>&lt;?
  $money=500001;
  
  if($money &gt; 0 AND $money &lt; 5000) {
      $class = 'Poor';
  } elseif ($money &gt;= 5000 AND $money &lt; 25000) {
      $class = 'Lower Class';
  } elseif ($money &gt;= 25000 AND $money &lt; 100000) {
      $class = 'Middle Class';
  } elseif ($money &gt;= 100000) {
      $class = 'Upper Class';
  }
  echo $class;
  exit();
  ?&gt;
  </code></pre>
  
  <p>Now, I know this function will work, but it seems like an absolutely awful way in going about writing it, since if more $class' are added, it becomes far too long. </p>
  
  <p>Now my question is: Is there a shorter way to write this? Possibly using range() and/or an array of values?</p>