| The Arcive of vBulletin Modifications Site. | |
| 
			 
			#1  
			
			
			
			
			
		 | ||||
| 
 | ||||
|  Using an array in an if statement.... 
			
			I want to know how to use several values, seperated by commas, in an if statement. This is probably very basic, but I need to know. Thanks    | 
| 
			 
			#2  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			can you be more specific?
		 | 
| 
			 
			#3  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			Say a variable contains this: Code: 5,6,7,10,56,63 Code: if ($bbuserinfo[usergroupid]=="5" OR $bbuserinfo[usergroupid]=="6" OR $bbuserinfo[usergroupid]=="7" OR $bbuserinfo[usergroupid]=="10" OR $bbuserinfo[usergroupid]=="56" OR $bbuserinfo[usergroupid]=="63") {Code: if ($bbuserinfo[usergroupid]==$variable) { | 
| 
			 
			#4  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			well this is what i would do... PHP Code: 
			 | 
| 
			 
			#5  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			Link, you should read more of my posts, i use the correct code very often: PHP Code: 
			 | 
| 
			 
			#6  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			That's what it is. I just didn't remember it becuase I haven't had any need for it until now.   Thanks.   | 
| 
			 
			#7  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			i'll have to remember that    | 
| 
			 
			#8  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			In forumdisplay.php, I have this code: PHP Code: 
			Furthermore, if the variable $allowusercreateprivate is set to 1, I want it to get all of that user's threads even if visible!=1. Any ideas on that? | 
| 
			 
			#9  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			try this PHP Code: 
			 | 
| 
			 
			#10  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			Nope... Code: Warning: Wrong datatype for second argument in call to in_array() in /home/sites/site68/web/forums/forumdisplay.php on line 493 Warning: Missing argument 2 for iif() in /home/sites/site68/web/forums/admin/functions.php on line 618 Warning: Missing argument 3 for iif() in /home/sites/site68/web/forums/admin/functions.php on line 618 | 
|  | 
| 
 | 
 | 
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
| 
 | |
|  More Information | |
| Template Usage: 
 Phrase Groups Available: 
 | Included Files: 
 Hooks Called: 
 |