title: Sorting integer value in php
body: <p>I have 19 variables in a php file. </p>
  
  <pre><code>$a = 20;
  $b = 23;
  $c = 2;
  $d = 92;
  $e = 51;
  $f = 27;
  $g = 20;
  $h = 20;
  .....
  .....
  $s = 32;
  </code></pre>
  
  <p>What i need, I need to show only top 5 value. And there is similar value for some variables. In that case, I need to show the first value only if it is in the top 5 value. </p>
  
  <p>I am not having any clue on doing this. </p>
  
  <p>After receiving  some feedback given bellow, i have used array and asort 
  Here is the example- </p>
  
  <pre><code>&lt;?php
  $fruits = array("a" =&gt; "32", "b" =&gt; "12", "c" =&gt; "19", "d" =&gt; "18");
  asort($fruits);
  foreach ($fruits as $key =&gt; $val) {
      echo "$key = $val\n";
  }
  ?&gt;
  </code></pre>
  
  <p>The output looks like this:</p>
  
  <pre><code>b = 12 d = 18 c = 19 a = 32 
  </code></pre>
  
  <p>I need the reverse result. Meaning, 32, 19, 18, 12.....</p>
  
  <p>Any help. Just dont know the exact command</p>