if(!isset($_GET["article_id"]) && !isset($_GET["category_id"])) {
echo 'article id is not set, and no category id is set';
foreach($tree as $parent_id=>$parent_array) {
echo "\r
" . $parent_array["title"] . '
';
$ADS->category_id = $parent_id;
$category_articles = $ADS->get_articles_by_cat();
$article_count = count($category_articles[$parent_id]);
if (sizeof($category_articles) > 0) {
echo "\r";
// Return each article for the given category
foreach($category_articles[$parent_id] as $article_id=>$article_array) {
echo "\r- ' . $article_array["title"] . '
';
}
echo "\r
";
}
}
}