如何从多维数组中提取数据

I have the following code how can i extract [real] value if [name] => Y Downtime Switch

[inputs] => Array
        (
            [1] => Array
                (
                    [name] => X Downtime Switch
                    [raw] => 10
                    [real] => 0.01
                    [unit] => V
                    [count] => 0
                    [maxval] => 10
                    [minval] => 0
                    [decimals] => 2
                    [alarm] => A---
                )

            [2] => Array
                (
                    [name] => Y Downtime Switch
                    [raw] => 9197
                    [real] => 9.2
                    [unit] => V
                    [count] => 0
                    [maxval] => 10
                    [minval] => 0
                    [decimals] => 2
                    [alarm] => ----
                )

            [3] => Array
                (
                    [name] => Z Run PR
                    [raw] => 9187
                    [real] => 9187
                    [unit] => mV
                    [count] => 0
                    [maxval] => 10000
                    [minval] => 0
                    [decimals] => 0
                    [alarm] => ----
                    )
)

For the sake of helping itself:

<?php
$data = [
    [
        'name' => "X Downtime Switch",
        'real' => 0.01,
    ],
    [
        'name' => "Y Downtime Switch",
        'real' => 9.2
    ],
    [
        'name' => "Z Run PR",
        'real' => 9187
    ]
];
$output = null;
array_walk($data, function($entry) use (&$output) {
    if ($entry['name'] == "Y Downtime Switch") {
        $output = $entry['real'];
    }
} );
var_dump($output);

The output obviously is:

float(9.2)

However I really recommend to you to read a bit about how this place works:

We are not here to do your work for you. We are here to help you with specific issues you run into while trying to solve your tasks yourself. That means you are expected to write your own code.