View Single Post
  #2  
Old 10-18-2012, 06:04 AM
Starfire2001 Starfire2001 is offline
Unholy Nation
Starfire2001's Avatar
Join Date: Dec 2010
Location: The streets.
Posts: 156
Starfire2001 will become famous soon enough
Quote:
Originally Posted by Vatec View Post
Hi all, I am working on an events system and want to use multi dimensional arrays but that standard "in" operator doesn't work like that, how else would I be able to check if the event name is correct?

PHP Code:
temp.array = {
    {
        
"test""30""30"
    
}, {
        
"event""30""30"
    
}
};
if (
eventName in temp.array) {} 
Probably easiest to just maintain a separate array with only event names. Or cycle through the array you have and check against the name against the first param of each.
__________________
-Ph8
Reply With Quote