There is an array of user states stored in the session. This works:
<?php if ($_SESSION['_app_user']['data']['state']['1']) { ?>
<p>User has state 1</p>
<?php } ?>
But, selecting multiple states doesn’t:
<?php if ($_SESSION['_app_user']['data']['state']['1,6,10']) { ?>
<p>User has state 1 or 6 or 10</p>
<?php } ?>
How can you check on multiple states?
By checking multiple.
You may find it easier to store the least common denominator to a temporary variable:
Also, please use quotes for your strings. It makes code clearer, and saves the PHP interpreter a bit of effort guessing that you mean a string instead of, say, a constant named
_app_user🙂