php if negative then 0

39

$value = -9;
echo max($value, 0); // Outputs '0'

Comments

Submit
0 Comments