我需要帮助。 从以下阵列中分离微粒阵列:
if($_SESSION["s"]["user"]["typ"] == admin ) {
$form["tabs"][ dns_soa ] = array (
title => "DNS Zone",
width => 100,
template => "templates/dns_soa_edit.htm",
fields => array (
##################################
# Begin Datatable fields
##################################
xfer => array (
datatype => VARCHAR ,
formtype => TEXT ,
default => ,
value => ,
width => 30 ,
maxlength => 255
),
update_acl => array (
datatype => VARCHAR ,
formtype => TEXT ,
default => ,
value => ,
width => 30 ,
maxlength => 255
),
active => array (
datatype => VARCHAR ,
formtype => CHECKBOX ,
default => Y ,
value => array(0 => N ,1 => Y )
),
##################################
# ENDE Datatable fields
##################################
)
);
}
I just:
unset($form["tabs"][ dns_soa ][ fields ][ xfer ]);
and to unset all 3 I do this. UPDATE - I have many array in fields actually but I just provide 3:
unset($form["tabs"][ dns_soa ][ fields ][ xfer ]);
unset($form["tabs"][ dns_soa ][ fields ][ update_acl ]);
unset($form["tabs"][ dns_soa ][ fields ][ active ]);
Is there anyway I could unset many array without coding
unset($form["tabs"][ dns_soa ][ fields ]array name here);
many times? Thanks in advance.
UPDATE - my apologies I should provide more information. 在3个阵列中,你如何使2个分离? 例如,仅可加以区别[xfer]和[活性]?