1
例如我有這樣的陣列稱爲$測試和所有的子陣列內被稱爲「鏈接」的,PHP:刪除選擇的條目中的多維數組
array(6) {
[0] = > array(3) {
["link"] = > string(56)
"http://gdata.youtube.com/schemas/2007#user.subscriptions" ["href"] = > string(67)
"http://gdata.youtube.com/feeds/api/users/test/subscriptions" ["countHint"] = > int(1)
}[link] = > array(3) {
["rel"] = > string(51)
"http://gdata.youtube.com/schemas/2007#user.contacts" ["href"] = > string(62)
"http://gdata.youtube.com/feeds/api/users/test/contacts" ["countHint"] = > int(0)
}[link] = > array(2) {
["rel"] = > string(48)
"http://gdata.youtube.com/schemas/2007#user.inbox" ["href"] = > string(59)
"http://gdata.youtube.com/feeds/api/users/test/inbox"
}[link] = > array(2) {
["rel"] = > string(52)
"http://gdata.youtube.com/schemas/2007#user.playlists" ["href"] = > string(63)
"http://gdata.youtube.com/feeds/api/users/test/playlists"
}[link] = > array(3) {
["rel"] = > string(50)
"http://gdata.youtube.com/schemas/2007#user.uploads" ["href"] = > string(61)
"http://gdata.youtube.com/feeds/api/users/test/uploads" ["countHint"] = > int(22)
}[link] = > array(2) {
["rel"] = > string(64)
"http://gdata.youtube.com/schemas/2007#user.newsubscriptionvideos" ["href"] = > string(75)
"http://gdata.youtube.com/feeds/api/users/test/newsubscriptionvideos"
}
}
如何我會得到具有["href"] = > string(61)"http://gdata.youtube.com/feeds/api/users/test/uploads"
內容的子數組「鏈接」。謝謝!
我試圖重新創建你的數組,但它似乎我只有一個子數組,因爲它使用了名爲「link」的相同索引。或者也許我在這裏錯過了一些東西 – rccoros