php max function to get name of highest value? <p>I have a multi array and I am using the max function to return the highest value, however I'd like it to return the name? How can I do that?</p> <pre><code>$total = array($total_one =&gt; 'Total One', $total_two =&gt; 'Total Two'); echo max(array_keys($total)); </code></pre> <p>Thanks!!</p>