title: Spaced Price Listing with PHP
body: <p>I would like to list the periodic price with php. 
  How can I do it?</p>
  
  <p>For example: 100€ to 500€</p>
  
  <pre><code>Result:
  100€ - 200€
  200€ - 300€
  300€ - 400€
  400€ - 500€
  </code></pre>
  
  <p>This is my current code:</p>
  
  <pre><code>$start = 100; 
  $end = 500;
  $step = 50; 
  foreach(range($start, $end, $step) as $i) {
      if ($start &lt; $i) { 
          echo ' - '.$i.'&lt;br&gt;'; 
      }
      switch ($i) { 
          default : echo $i; 
      }
      if($end &lt;= $i) {
           echo ' - Üstü';
      }
  } 
  </code></pre>
  
  <p>This outputs:</p>
  
  <pre><code>100 - 150 
  150 - 200 
  200 - 250 
  250 - 300 
  300 - 350 
  350 - 400 
  400 - 450 
  450 - 500 
  500
  </code></pre>
  
  <p>How can I get rid of the last price?</p>