title: Simple php if else loop help needed
body: <p>I have a function like this</p>
  
  <pre><code>function cp_module_ranks_getRank($uid){
          return cp_module_ranks_pointsToRank(cp_getPoints($uid));
      }
  </code></pre>
  
  <p>It returns the member rank based on points i set.
  For example my settings has</p>
  
  <ol>
  <li>250 Points = Bronze</li>
  <li>1000 Points = Silver</li>
  <li>2500 Points = Gold</li>
  <li>10000 Points = Diamond</li>
  <li>25000 Points = Platinum</li>
  </ol>
  
  <p>So if a user has 11234 points then that function return value as <strong>Diamond</strong></p>
  
  <p>Now i would like to set a variable based on this rank.</p>
  
  <p><code>$affdays</code> is the variable</p>
  
  <p>I mean like this</p>
  
  <pre><code>If user rank is Bronze $affdays = 30
  If user rank is Silver $affdays = 60
  If user rank is Gold $affdays = 90
  If user rank is Diamond $affdays = 180
  If user rank is Platinum $affdays = 360
  Default $affdays = 10
  </code></pre>
  
  <p>Thanks. </p>