Is there an operator that denotes a variable as both greater and lesser than? The following code block is not valid code.
if (0 < $variable < 5)
{
etc
}
Advertisement
Answer
No. You’d want to use an “AND” operator, &&:
if ($variable > 0 && $variable < 5) {
// bla.. bla.. bla..
}