Topic: List all categories

Hello,

how can i list all categories?

Thx


2 (edited by 2013-06-26 23:36:13)

Re: List all categories

Hello,

how can i list all categories?

Thx

I found a solution:

<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?PHP
$static = true;
$template = "projekte";
$category = '1';
include("cutenews/show_news.php");

for($count = 0; $count <= sizeof($cat); $count++){
echo "$cat[$count]";
}


?> </div>

Re: List all categories

better is:

<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?php




$cats = file("cutenews/cdata/category.db.php");
foreach($cats as $cat_line)
{
      $cat_line_arr = explode("|", $cat_line);
      if($cat_line_arr[0] == $_GET['ucat'])
            $fetchcat = $cat_line_arr[1];
            echo "$cat_line_arr[1]";


}


?> </div>