|
Posted by PhilM on 08/12/05 04:39
I would like some assistance in methodology to reassign/reset array keys to
consecutive numbering, while keeping in sync a second array that uses the
key of the first as it's key set.
If I have read a solution on php.net, I didn't understand what I was
reading.
At this stage of bumbling around, I am getting rather confused/frustrated.
...and getting mind around multidimensional arrays hurts :)
*** note php4 only available ***
$links is used to generate main page links.
$gallery is used to generate links on the $links page that has the same key
value.
The output below was produced using my config generator form, which enables
adding/deletion of links and associated galleries, which accounts for the
gaps in the $links key.
///// LINK LIST (TOP OF PAGE LINKS) /////
$links[0]=array('home'=>'Home');
$links[1]=array('service'=>'Services');
$links[3]=array('people'=>'Portraits');
$links[5]=array('fundraise'=>'Fundraise');
$links[6]=array('events'=>'Events');
$links[7]=array('contact'=>'Contact');
///// GALLERY LIST /////
$gallery[0]=array('service'=>'Service','reception'=>'Reception');
$gallery[3]=array('family'=>'Family','children'=>'Children','adults'=>'Adult
s');
$gallery[5]=array('cards'=>'Cards','leaflets'=>'Leaflets');
Navigation:
[Reply to this message]
|