如何获取此数组中的值? [重复]

问题描述:

This question already has an answer here:

I cannot figure out getting the string 'foo' printed from an array. How can I just print the value in 'tags'?

print_r(array_values($res));

Array
(
    [0] => Array
        (
            [tags] => foo
        )

)
</div>

Arrays work in depth. You can have array that store arrays and so on. If:

$res = array ( 0 => array ( ['tags'] => 'foo' ) );
echo $res[0]['tags']; // foo

does that make sense?

Also, be careful when using Array and array

Array vs array