我有了裏面的一些其他數組的數組:如何從多個數組中獲取最後一個數組?
,如果我print_r($u)
我得到:
Array
(
[0] => Albany
)
Array
(
[0] => Albany
Array
(
[0] => Albany
[41] => Albuquerque
)
Array
(
[0] => Albany
[41] => Albuquerque
)
Array
(
[0] => Albany
[41] => Albuquerque
[54] => Atlanta
)
Array
(
[0] => Albany
[41] => Albuquerque
[54] => Atlanta
)
Array
(
[0] => Albany
[41] => Albuquerque
[54] => Atlanta
[93] => Auckland
[94] => Augusta
)
Array
(
[0] => Albany
[41] => Albuquerque
[54] => Atlanta
[93] => Auckland
[94] => Augusta
)
...
最後的陣列有大約20種元素。我只需要最後一個數組。希望這不是太混亂。
它看起來不像你有一個多維數組(「其內部的數組」)。它看起來像你正在打印數組'$ u'而你循環它並添加元素。 – NullUserException