okay, i finally got an organization on my arryays, but now I need to search through them and count how many results I get back, check out my coding:
$getarticles=mysql_query("select * from articles");
$amount=mysql_num_rows($getarticles);
for ($b=0; $b < $amount; $b++){
$cat_id=mysql_result($getarticles, $b, 'cat_id');
$subcat_id=mysql_result($getarticles, $b, 'subcat_id');
$id=mysql_result($getarticles, $b, 'article_id');
$title=mysql_result($getarticles, $b, 'title');
$array[$cat_id][$subcat_id][$id]["title"]=$title; }
$getcats=mysql_query("select * from article_cats");
$howmanycats=mysql_num_rows($getcats);
for ($i=0; $i< $howmanycats; $i++){
$cat_id=mysql_result($getcats, $i, 'cat_id');
$name=mysql_result($getcats, $i, 'name');
$catagory[$cat_id]["name"]= $name; }
$getsubcats=mysql_query("select * from article_subcats");
$howmanysubcats=mysql_num_rows($getsubcats);
for ($a=0; $a< $howmanysubcats; $a++){
$subcat_id=mysql_result($getsubcats, $a, 'subcat_id');
$name2=mysql_result($getsubcats, $a, 'name');
$subcatagory[$subcat_id]["name"]= $name2; }
echo $subcatagory[2]["name"]
now, for every $array entry, i need to assign the appropriate name, so I need some for of for loop of foreach loop to sort through the arrays and return how many I have, for example, i may have no articles that are array[1][1][$id]["title"];
so what can I do?