function - how to find min value with out count zero in php? -
i want find min value out count 0 form min() function in php, me zero, how can find out out zero?
$a = 0; $b = 3; $c= 4, $d = 8; $minvalue = min($a,$b,$c,$d);
the expected result want 3, gives me zero,
how can neglect zero, want result out zero, please me this. in advance
something this
function ownmin($value) { return min(array_filter(func_get_args())); } $a = 0; $b = 3; $c= 4; $d = 8; echo ownmin($a,$b,$c,$d); // 3
Comments
Post a Comment