PHP 8.4.24 Released!

Voting

: min(five, one)?
(Example: nine)

The Note You're Voting On

FatBat
14 years ago
Needed to get the index of the max/highest value in an assoc array.
max() only returned the value, no index, so I did this instead.

<?php
reset($x);   // optional.
arsort($x);
$key_of_max = key($x);   // returns the index.
?>

<< Back to user notes page

To Top