What is the easiest way in PHP to write:
if variable does not equal 1, 2, 3, 4, or 5
is it
if($num != 1, 2, 3, 4, 5)
?
if ($num < 1 || $num > 5)
does that include float numbers too? (i.e: 1.5, 2.3, 4.9)
It has to be an integer, just 1 2 3 4 5
so then 1 is not okay but 1.1 is? then you gotta use an if like this
if ( ! ( $num == 1 || $num == 2 || $num == 3 || $num == 4 || $num == 5) )
something like:
if(! is_int($num) and ($num >= 1) and ( $num <= 5) )