Yes. The answer is yes.
http://www.php.net/manual/en/language.operators.logical.php
Two things though:
- Many programmers prefer
&&and||instead ofandandor, but they work the same (safe for precedence). $status="clear"should probably be$status == 'clear'.=is assignment,==is comparison.