PHP如何访问多维数组

I know there are so many solutions for multi-dimensional array access. But any of them didn't work for me.

I have this array and i need to access the name property by looping through the whole array. How do i access the Value 'TEXTPRINT' which is in the Name attribute?

Array
(
    [0] => Array
        (
            [ParentSurvey] => Array
                (
                    [attributes] => Array
                        (
                            [type] => SM_Survey__c
                            [url] => /services/data/v36.0/sobjects/SM_Survey__c/a181400000FHVy0AAH
                        )

                    [Id] => a181400000FHVy0AAH
                    [Company__c] => a0Qa000000ME65MEAT
                    [Type__c] => Company Critical Roles
                    [Company__r] => Array
                        (
                            [attributes] => Array
                                (
                                    [type] => Company__c
                                    [url] => /services/data/v36.0/sobjects/Company__c/a0Qa000000ME65MEAT
                                )

                            [Id] => a0Qa000000ME65MEAT
                            [Name] => TEXTPRINT
                        )

                )

            [DescList] => Array
                (
                    [0] => Array
                        (
                            [attributes] => Array
                                (
                                    [type] => SM_Survey_Detail__c
                                    [url] => /services/data/v36.0/sobjects/SM_Survey_Detail__c/a171400000PkHmsAAF
                                )

                            [Id] => a171400000PkHmsAAF
                            [CR_Designation__c] => a0ka0000004r6biAAA
                            [SM_Survey__c] => a181400000FHVy0AAH
                            [CR_Designation__r] => Array
                                (
                                    [attributes] => Array
                                        (
                                            [type] => Designation__c
                                            [url] => /services/data/v36.0/sobjects/Designation__c/a0ka0000004r6biAAA
                                        )

                                    [Id] => a0ka0000004r6biAAA
                                    [Name] =>Manager
                                )

                        )

I tried this code to print the value..

foreach ($result as $record){
    print_r($record['Array']['ParentSurvey']['Company__r']['Name']);
}

Try this

foreach ($result as $record){
    print_r($record['ParentSurvey']['Company__r']['Name']);
}