title: Search for highest key/index in an array
body: <p>How can I get the <strong>highest</strong> <code>key/index</code> in an array with <a href="/questions/tagged/php" class="post-tag" title="show questions tagged &#39;php&#39;" rel="tag">php</a>? I know how to do it for the values.</p>
  <p>E.g.: from this array I would like to get <code>10</code> as an <code>integer</code> value:</p>
  <pre class="lang-php prettyprint-override"><code>$arr = array(1 =&gt; &quot;A&quot;, 10 =&gt; &quot;B&quot;, 5 =&gt; &quot;C&quot;);
  </code></pre>
  <p>I know how I could code it but I was asking myself if there is a function for this as well.</p>