时间:2021-07-01 10:21:17 帮助过:29人阅读
$a = 3;$b = 4;$c = 2;$r = array('a' => $a, 'b' => $b, 'c' => $c);echo array_search(min($r), $r); //c
$a = 3;
$b = 4;
$c = 2;
if($a最小){
}
if($b最小){
}
if($c最小){
}
是这个意思,这个如果写呢?
$a = 3;$b = 4;$c = 2;if($a == min($a, $b, $c)) echo '$a 最小';if($b == min($a, $b, $c)) echo '$b 最小';if($c == min($a, $b, $c)) echo '$c 最小';$c 最小