title: Echo Out Interger Differently If More Than Value PHP
body: <p>So I'm creating a points system for my website which I want to change to an echo instead of the actual integer when shown on the users profile. 
  For example: When the integer is lower than 1000 it displays as the actual number (lets say: 645). But when it is between 1000 and 1100, it will display as '1k' and so on. What I've got so far does work, but displays incorrectly and does seem a bit of a waste of space.. Is there any way to do this in a much simpler; faster way?</p>
  
  <p>Thanks!</p>
  
  <p>code: </p>
  
  <pre><code>&lt;?php
  
     $points_disp = $user_data['points'];
  
     if($points_disp &lt; 1000){
        echo $points_disp;
     } else if ($points_disp &gt;= 1000){
        echo '1k';
     } else if ($points_disp &gt;= 1200){
        echo '1.2k';
     } else if ($points_disp &gt;= 1400){
        echo '1.4k';
     } else if ($points_disp &gt;= 1600){
        echo '1.6k';
     } else if ($points_disp &gt;= 1800){
        echo '1.8k';
     } else if ($points_disp &gt;= 2000){
        echo '2k';
     }
  
  ?&gt;
  Edit: I figured out an easier way to do this;
  
  code (for anyone else who needs to do this):
  
  &lt;?php
  $points_disp = $user_data['points'];
  $fdigit = substr($points_disp, 0, 1);
  $sdigit = substr($points_disp, 1, 1);
  
  if ($points_disp &lt; 1000){
      echo $points_disp;
  } else if ($points_disp &gt;= 1000){
      echo $fdigit . "." . $sdigit . "k";
  }
  
  echo $num; 
  ?&gt;
  </code></pre>