get compared value from in_array php -


मेरे पास सरणी है:

  $ conditions = array ("type", "genre" ); $ Type = सरणी ( "बार्स" "रेस्तरां"); $ शैली = सरणी ("अमेरिकन", "आयरिश पब");   

मेरी स्थिति

  $ excelvalue = 'आईआरआईएसएच पब';   

मुझे "आयरिश पब" का मूल्य कैसे प्राप्त होगा I in_array () के माध्यम से तुलना करते समय सरणी से?

आप array_search का उपयोग करना चाहते हैं । आपके पास एक टाइपो भी था: $ $ शर्तों की बजाय $ शर्तों :

  $ excelvalue = 'IRiSH PUB'; अगर (सरणी_सर्च (स्ट्रॉल्वर ($ एक्सेलव्यू), सरणी_मैप ('स्ट्र्टोलॉयर', $ शर्तों)) {// कुछ कोड}    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -