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