let's just say that this page i'm writing is called 'registry.php'. this page will be more-or-less a template, however contents of this page will vary depending on one variable. the variable is the ID number of a newlywed couple (in the database).
the content of registry.php will contain tables. each table is titled a certain category, each category has items that fall under that category, and each item has attributes. that will always be showen on registry.php, but each newlywed couple has different amounts of different items, and i need to express that if a user happens to click on a certain newlywed couple on the previous page. 'The Smiths' link was clicked, therefore the contents of registry.php will loop through all the items that match their associated ID number.
so, i've got a few things i need to be able to cycle through on command, obviously. i've got a 3-dimensional array that looks something like this...
$category = array($linens, $china, $kitchen, $lighting, etc...etc...etc...); //example of element inside category $linens = array($napkins, $towels, $sheets, $drapes, etc...etc...etc...); //example of element inside linens. these are associative arrays. $napkins = array("qtyReq" => $cmsVar1, "stillNeed" => $cmsVar2, "price" => $cmsVar3, etc...etc...etc...);
so, my question is, is there anyway to perform the same loop, or nested loops to loop through all of these arrays, but change the content of these arrays by changing one variable? (the unique ID number associated with each newlywed couple)
how would i design the structure of my arrays to allow this to happen? how would i design my MySQL tables in order to call these variables in the right fashion?