如何在多维数组中搜索数据并显示结果

I very confused now. I have the dimensional array and I want to search and also show each data. This is my array:

Array(
 [0] => Array(
          [unknowndata] => Array(
                            [id] => 00001
                            [content] => some text here
                           )
        )
 [1] => Array(
          [realdata] => Array(
                         [id] => 00001
                         [content] => abcdefg
                        )
        )
 [2] => Array(
          [realdata] => Array(
                          [id] => 00002
                          [content] => abcd
                        )
        )
)

My question is

  1. how to show only the realdata if the key is different (in the example, the unknowndata is in array[0], how if the unknowndata is in array[n])

  2. how to process the content of realdata (if the content is abcd return true else return false)

Is that what you want?

foreach($yourarray as $element){
   if(array_key_exists("realdata",$element)) {
     echo $element['realdata']['content'];
   }
}