22 lines
339 B
PHP
22 lines
339 B
PHP
<?php
|
|
|
|
function minmax($a)
|
|
{
|
|
$valmin = min($a);
|
|
$valmax = max($a);
|
|
return array(
|
|
"min" => $valmin,
|
|
"max" => $valmax
|
|
);
|
|
}
|
|
|
|
print_r(minmax(array(
|
|
"maxime" => 1,
|
|
"coutteau" => 24,
|
|
"jean" => 5,
|
|
"claude" => 9,
|
|
"nunes" => 10,
|
|
"david" => 2222,
|
|
"gatel" => 291,
|
|
"frederic" => 20
|
|
)));
|