Skip to content
Advertisement

Check if specific array key exists in multidimensional array – PHP

I have a multidimensional array e.g. (this can be many levels deep):

JavaScript

I am trying to loop through it to see if a certain key exists:

JavaScript

But it finds nothing. Is there an error in the loop?

Advertisement

Answer

I played with your code to get it working :

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement