holowugz Posted September 6, 2006 Share Posted September 6, 2006 Hi i am having a slight problem with an if statement i need it to do the following:if the value of do in the request superglobal array is set to alter, and the person usergroup id is 6 OR their is a 6 in there membergroupids then execute some code.[code]$_REQUEST['do']= "alter";$citac->userinfo['membergroupids'] = "1,2,3,4,5,6";if($_REQUEST['do'] == 'alter' AND ($citac->userinfo['usergroupid'] == 6 OR in_array(6,array($citac->userinfo['membergroupids'])))){echo "test";}[/code]theoretically that should echo test but it doesnt, can anyone see something wrong?thanks in advance,Luke Quote Link to comment https://forums.phpfreaks.com/topic/19964-if-statement-problem/ Share on other sites More sharing options...
Barand Posted September 7, 2006 Share Posted September 7, 2006 try$citac->userinfo['membergroupids'] = array(1,2,3,4,5,6); Quote Link to comment https://forums.phpfreaks.com/topic/19964-if-statement-problem/#findComment-87489 Share on other sites More sharing options...
holowugz Posted September 7, 2006 Author Share Posted September 7, 2006 Hi ty for the help, it is early in the morning over here so i am not thinking lol. ty again Quote Link to comment https://forums.phpfreaks.com/topic/19964-if-statement-problem/#findComment-87493 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.