如何从结果中读取此数组preg_match_all


How to read this array from preg_match_all result?

我从preg_match_all得到这个结果

preg_match_all('#mpeg"'],"Content-Length":'["(.*?)","(.*?)"#', $size,$out);

输出:

Array
(
    [0] => Array
        (
            [0] => mpeg"],"Content-Length":["697","3595701"
        )
    [1] => Array
        (
            [0] => 697
        )
    [2] => Array
        (
            [0] => 3595701
        )
)

我试图显示最后一个值:3595701 whit :

$size = $out[2][0];

但总是空的?,我错过了什么吗?

与其转储preg_match_all的值,不如转储$out的值 - 我有一种感觉,你的价值在于$out[2]