![]() |
checking an array's contents
I wonder if there's a way to just check an array's contents without actually doing so, for instance if I had an array full of account strings how would I check if one of them was the client's player.account? account.array[someselectingparams] (what would those params be?)
|
This is an example of an array:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
I'm not a n00b, I know what an array and index is (I wrote in the post) I was just merely asking if there was a way to check the array content (because in java normally you'd loop through each value). Thanks for the reply though helped me solve my problem - can't imagine why there is an 'in' operator though lol gs2
|
Quote:
Yeah, "in" can make things so much easier. |
i was wondering as well if you can check if a value is not in array with a similar method
|
Quote:
PHP Code:
|
| All times are GMT +2. The time now is 11:01 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.