Help for this page

Select Code to Download


  1. or download this
    $all_cats = $dbh->selectall_arrayref("SELECT category_id,name FROM $sq
    +l{catego
      +ries} WHERE parent=$parent_cat_id ORDER BY category_id");
    
  2. or download this
    @categories = (
                   {
    ...
                   },
                   ...
                   );
    
  3. or download this
    $indent .= "  ...";
    
  4. or download this
    $level++;
    
  5. or download this
            foreach my $current_cat (sort { $a->[1] cmp $b->[1] } @{$all_c
    +ats}) {
                  ($cat{id}, $cat{name}) = @$current_cat;
                  push @main::categories {level=>$level,name=>$cat{name},i
    +d=>$cat{id}};
                  &ListCategories($indent, $cat{id}, 'y');
              }