title: How to get the key/value pair from the highest and lowest array value?
body: <p>I have a simple array like this:</p>
  
  <pre><code>Array(
      [a] =&gt;  1,
      [b] =&gt;  5,
      [c] =&gt; 10
  )
  </code></pre>
  
  <p>Now I want to get the key/value pair for the highest and lowest array value. Means the expected output would be:</p>
  
  <pre><code>//Max value
  Key:    c
  Value: 10
  //Min value
  Key:    a
  Value:  1
  </code></pre>
  
  <p>I tried something like this:</p>
  
  <pre><code>$max_key = max( array_keys( $array ) ); 
  </code></pre>