我有一個數組「$ ABC」,其具有9個元素,如: -串聯在許多一些數組元素在PHP
Array
(
[a] => Jack
[b] => went
[c] => up
[d] => the
[e] => hill
[f] => but
[g] => never
[h] => came
[i] => back
)
現在我需要Concat的僅從「b」的索引開始的4個元件僅限於「e」索引。但我不知道該怎麼做。在所有數組元素被連接的情況下,我使用PHP的「implode()」函數。
任何幫助,非常感謝。
+1整潔使用array_intersect_key()和array_flip() – 2010-08-03 08:20:46