I would like to know how to do PHP detect if a variable is with the value between one of the values passed.
Explaining better I have a variable with a value, this value will cause it to include a file in the content and I need PHP to detect if this value is greater than or equal to "value" and less than or equal to "value."
<?php
$var = "valor>";
if ( $var <= "100")
include "m3.html";
else{
if ( $var <= "40" && >= "99")
include "m1.html";
else{
if ( $var >= "39")
include "m2.html";
}
}
?>
As you can see the second if
that has two values greater than value and less equal to value has given me problem, I already put &
&&
and and
and it does not make it necessary for PHP to detect if a variable has a value between 40 and 99 to include m1.html in>.