從數組中刪除子陣列我有一個陣列:PHP由值
Array
(
[1] => Array
(
[id] => 352
[name] => account_3
[ips] =>
[tech_prefix] =>
[password] =>
[id_voip_hosts] =>
[proxy_mode] =>
[auth_type] => ani
[ani] => 1345436
[accname] =>
[protocol] =>
[port] =>
[orig_enabled] => 1
[term_enabled] =>
[orig_capacity] =>
[term_capacity] =>
[orig_rate_table] =>
[term_rate_table] =>
[id_dr_plans] =>
[orig_groups] =>
[term_groups] =>
[notes] =>
)
[2] => Array
(
[id] => 354
[name] => account_4
[ips] =>
[tech_prefix] =>
[password] =>
[id_voip_hosts] =>
[proxy_mode] =>
[auth_type] => ani
[ani] => 472367427
[accname] =>
[protocol] =>
[port] =>
[orig_enabled] => 1
[term_enabled] =>
[orig_capacity] =>
[term_capacity] =>
[orig_rate_table] =>
[term_rate_table] =>
[id_dr_plans] =>
[orig_groups] =>
[term_groups] =>
[notes] =>
)
[3] => Array
(
[auth_type] => ani
[name] => 472367427
[ani] => 472367427
[orig_enabled] => Array
(
[0] => on
)
)
)`
的主陣列coult含有許多「子陣列」,從[1]〜[10]例如。 我需要什麼:我需要刪除「子陣列」女巫有[任何] => $ todel 例如,$ todel = 472367427,這意味着該數組必須包含子數組[1]和[3]等等。
你有關於如何解決這個問題有什麼想法? – zerkms
472367427值是如何表示必須包含子數組[1]和[3]?另外,我仍然不確定你想要實現什麼... –
哦,請縮進你的代碼。 –