13 lines
210 B
PHP
13 lines
210 B
PHP
<?php
|
|
|
|
function minmax($a)
|
|
{
|
|
$valmin = min($a);
|
|
$valmax = max($a);
|
|
return array(
|
|
"min" => $valmin,
|
|
"max" => $valmax
|
|
);
|
|
}
|
|
|
|
print_r(minmax(array(1, 24, 5, 9, 10, 2222, 291, 20)));
|