okay, i need to make a arrray that holds an array of 2 different id numbers, $catagory_id and $subcatagor_id are both variables inside a loop that take on a different number each loop. I want to put those number inside an array, each one being it's on array, but I need those numbers to be inside another array that I can call to find another array that will be inside that same array: sounds confusing, but basically, I have a table with ID's each id is assigned a catagory and and a sub catagory, each id is unique but there could be multiple id's under the same sub_cat and cat. So, i need the array to be set up so that I could call all id's that have a certain cat and subcat number:
echo ("$idnumber[$cat_id][$subcat_id]");
so, I dont know much about arrays, especially multi-dimensional arrays. I cant figure out the structure of the array, it get's pretty involved because the array will almost act like a function, with a tree of information inside:
here is the scoop, i'm runing a mysql query that will have multiple rows of information, each containing rows cat_id, subcat_id, id, title. Now I need to organize this information in a tree like structure, so that I can call all id's in the same cat, or all id's in the same cat and subcat, and a specific id in a cat and subcat. so this is how I thought of it:
$gettitle=array("cat_id" => (
array $cat_id => ( array "subcat_id" => (
array $subcat_id = > ( array "id" => (array $id =>
array "titles" => (array $title) ) ))));
okay, I have little experience with arrays and their structure, my php book barely touches them and online resources all say the same thing.