各位大神,帮看下,明明提交了4个分数,统计出2个?咋回事儿?
php吧
全部回复
仅看楼主
level 3
秋落叶雷 楼主
各位大神,帮看下,明明提交了4个分数,统计出2个?咋回事儿?
2021年09月13日 01点09分 1
level 1
array_shift和array_pop把数组元素删除了
2021年09月13日 09点09分 2
非常感谢![呵呵]
2021年09月13日 13点09分
有啥好的解决办法没?[乖]
2021年09月13日 13点09分
level 7
拿去试试
$arr = [13,77,54,99,6];
asort($arr);
$newArr = array_values($arr);
$min = $newArr[0];
$max = $newArr[count($arr) - 1];
echo json_encode($newArr).'<br>';
echo $min.'<br>';
echo $max.'<br>';
2021年09月14日 00点09分 3
谢谢!
2021年09月14日 13点09分
level 11
// 等你熟练了以后的写法 现在还不可取
$min = min($score);
$max = max($score);
注意:表单的输入框name=fs[] 这样拿到的数据好处理些,有时候写键名好处理些,依据上下环境而定吧。
小尾巴,哼哼
2021年09月14日 16点09分 4
谢谢!涨知识了[呵呵]
2021年09月16日 23点09分
level 14
建议用截图,这种看着伤眼睛
2021年09月16日 03点09分 5
好的,下次注意[乖]
2021年09月16日 23点09分
1