Here is what I'm trying to do:

$entries=array(); $entries[0]["displayname"][0]="Ivan" ; $entries[0]["age"][0]=32 ; $entries[1]["displayname"][0]="Anna" ; $entries[1]["age"][0]='24' ; $entries[2]["displayname"][0]="Bob" ; $entries[2]["age"][0]=29 ; $entries[3]["displayname"][0]="Stuart"; $entries[3]["age"][0]=42 ; if (array_key_exists('displayname', $entries)) { echo "YES '$entries'."; } 

But the problem is that you need to address through the first element of the array. Trying to build a ForEach construct ...

    1 answer 1

     foreach($entries as $entry) { if (array_key_exists('displayname', $entry)) { echo "Массив содержит элемент 'displayname'."; } 
    • it was necessary to take a break of 5 minutes and the brain began to think .. :) - Oleg Zolotarenko