从多维数组php返回值

I'm hoping there is a better way of returning the values from each of cy_GB['value] and en_GB['value] from the array below:

MultilingualSelectAttributeTypeOptionList Object (
    [options:MultilingualSelectAttributeTypeOptionList:private] => Array
        (
            [0] => MultilingualSelectAttributeTypeOption Object
                (
                    [error] => 
                    [id] => 7
                    [values] => Array
                        (
                            [cy_GB] => Array
                                (
                                    [id] => 13
                                    [value] => Audio described
                                )

                            [en_GB] => Array
                                (
                                    [id] => 14
                                    [value] => Audio described
                                )

                        )

                    [th] => TextHelper Object
                        (
                        )

                )

            [1] => MultilingualSelectAttributeTypeOption Object
                (
                    [error] => 
                    [id] => 3
                    [values] => Array
                        (
                            [cy_GB] => Array
                                (
                                    [id] => 5
                                    [value] => BSL signed
                                )

                            [en_GB] => Array
                                (
                                    [id] => 6
                                    [value] => BSL signed
                                )

                        )

                    [th] => TextHelper Object
                        (
                        )

                )

        )

    [error] => 
)

This is what I've tried. I should also use more meaningful names.:

foreach ($selectedOptions as $row) {

    foreach ($row as $key) {

        foreach ($key as $k => $v) {

            if($k == 'cy_GB') {
                echo $v['value'];
            }

            if($k == 'en_GB') {
                echo $v['value'];
            }

        }

    }

}

I know this kind of thing has been asked many times before so I apologise for that. any help would be most appreciated.

Something like this could work:

function findKeyRec($obj, $search) {

  if( !is_array( $obj ) && !$obj instanceof Traversable ) return;

  foreach($obj as $key => $value) {
    if($key == $search) {
        echo $value['value'];
    } else {
       findKeyRec($value, $search);
    }
  }
}

findKeyRec($ar, 'cy_GB');
findKeyRec($ar, 'en_GB');

It's not shorter, but in my opinion more elegant, and it should work with any object/array structure.

Untested.