Loop in an array
#1

So uh I was trying to check every content of the array if each of them are equal to one, but I'm kinda having troubles in how to shorten it. Here's how far I've gone

PHP код:
if((PlayerInfo[id][Inv][1] == 1) || (PlayerInfo[id][Inv][2] == 1) || (PlayerInfo[id][Inv][3] == 1) || (PlayerInfo[id][Inv][4] == 1) || (PlayerInfo[id][Inv][5] == 1) || (PlayerInfo[id][Inv][6] == 1) || (PlayerInfo[id][Inv][7] == 1) || (PlayerInfo[id][Inv][8] == 1) || (PlayerInfo[id][Inv][9] == 1)) 
Reply


Messages In This Thread
Loop in an array - by NealPeteros - 09.10.2018, 10:48
Re: Loop in an array - by Calisthenics - 09.10.2018, 11:00
Re: Loop in an array - by NealPeteros - 09.10.2018, 11:45
Re: Loop in an array - by NaS - 09.10.2018, 11:52
Re: Loop in an array - by NealPeteros - 09.10.2018, 12:07
Re: Loop in an array - by NaS - 09.10.2018, 12:11

Forum Jump:


Users browsing this thread: 1 Guest(s)