<?php
$arr = ['10','100','50','90','2','5'];
$min = min($arr);
$max = max($arr);
echo $min.PHP_EOL;
echo $max.PHP_EOL;
相关文章
- 11-29PHP里获取一维数组里的最大值和最小值
2022-11-29 13:16:10
<?php
$arr = ['10','100','50','90','2','5'];
$min = min($arr);
$max = max($arr);
echo $min.PHP_EOL;
echo $max.PHP_EOL;