Re: wierd if statement problem

From: Date: Wed, 21 May 2003 08:05:37 +0000
Subject: Re: wierd if statement problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-148382@lists.php.net to get a copy of this message
At 08:46 21.05.2003, daniel@electroteque.org said: --------------------[snip]-------------------- >sorry forget those examples groupID should be either 1 or 2 and not 3, >check the other examples i've sent if they work i'm stumped :\ --------------------[snip]-------------------- So you're basically trying to determine if the Group ID is contained in a certain set? Why don't you try it this way - and it's even more expandable: $groups_allowed = array(1,2); // can be constructed elsewhere if (!in_array($_SESSION['group_id'], $groups_allowed)) logout(); -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#148382) next »