Hi
Can someone help me out by explaining how I can programatically rename the
key of an associated array? EG Cat01,Cat02 in the example below.
$cats = array(
"Cat01" => array("lv1" => 1, "lv2" => 1, "lv3" => 1, "lv4" => 1, "lv5" =>
1 ),
"Cat02" => array("lv1" => 1, "lv2" => 1, "lv3" => 1, "lv4" => 1, "lv5" =>
1 ),
"Cat03" => array("lv1" => 1, "lv2" => 1, "lv3" => 1, "lv4" => 1, "lv5" =>
1 ),
"Cat04" => array("lv1" => 1, "lv2" => 1, "lv3" => 1, "lv4" => 1, "lv5" =>
1 ),
"Cat05" => array("lv1" => 1, "lv2" => 1, "lv3" => 1, "lv4" => 1, "lv5" =>
1 ),
"Cat06" => array("lv1" => 1, "lv2" => 1, "lv3" => 1, "lv4" => 1, "lv5" =>
1 ),
"Cat07" => array("lv1" => 1, "lv2" => 1, "lv3" => 1, "lv4" => 1, "lv5" =>
1 ),
"Cat08" => array("lv1" => 1, "lv2" => 1, "lv3" => 1, "lv4" => 1, "lv5" =>
1 ),
"Cat09" => array("lv1" => 1, "lv2" => 1, "lv3" => 1, "lv4" => 1, "lv5" =>
1 ),
"Cat10" => array("lv1" => 1, "lv2" => 1, "lv3" => 1, "lv4" => 1, "lv5" =>
1 ));

How do I reference the name of each category i.e Cat01, Cat02 so that I can
programatically change the name (I need them to be user defineable).  This
is part of a security level options setup screen by the way, that is the
lv1-5 are user levels - boolean so that we can allow disallow access to
approriate option/categories. I enclose the script I am trying to build if
you have time to check it out.

Thanks in advance
Regards
Tony Ayling
Harmony so



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to