Aug 22, 2003 #1 pugs421 Technical User Joined Nov 25, 2002 Messages 114 Location US Is there a way to see if a value has already been stored in an array? if array contains $this_variable { echo this } else { echo that }
Is there a way to see if a value has already been stored in an array? if array contains $this_variable { echo this } else { echo that }
Aug 22, 2003 #2 sleipnir214 Programmer Joined May 6, 2002 Messages 15,350 Location US Try array_search() (http://us2.php.net/manual/en/function.array-search.php) Read the page pointed to by the link, and pay special attention to the warning on that page. It's important. Want the best answers? Ask the best questions: http://www.catb.org/~esr/faqs/smart-questions.htmlTANSTAAFL!! Upvote 0 Downvote
Try array_search() (http://us2.php.net/manual/en/function.array-search.php) Read the page pointed to by the link, and pay special attention to the warning on that page. It's important. Want the best answers? Ask the best questions: http://www.catb.org/~esr/faqs/smart-questions.htmlTANSTAAFL!!