Quantcast
Channel: How to check if multiple array keys exists - Stack Overflow
Browsing all 22 articles
Browse latest View live

Answer by alex for How to check if multiple array keys exists

If you only have 2 keys to check (like in the original question), it's probably easy enough to just call array_key_exists() twice to check if the keys exists.if (array_key_exists("story", $arr)...

View Article


How to check if multiple array keys exists

I have a variety of arrays that will either containstory & messageor just storyHow would I check to see if an array contains both story and message? array_key_exists() only looks for that single...

View Article

Browsing all 22 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>