Author Topic: rows (first / row / last) - How to Add the First and Last Class  (Read 8109 times)

0 Members and 1 Guest are viewing this topic.

Offline .Infecto

  • Newbie
  • *
  • Posts: 48
    • View Profile
Hallo zusammen,

wie bewerkstellige ich es, das ich das erste row immer mit class="item-first" füllen kann?

  while ($image_row $site_db->fetch_array($result)){
    if (
$count == 0) {
      
$row_bg_number = ($bgcounter++ % == 0) ? 2;
      
$new_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    
$new_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";

    
show_image($image_row);
    
$new_images .= $site_template->parse_template("thumbnail_bit");
    
$new_images .= "\n</td>\n";
    
$count++;
    if (
$count == $config['image_cells']) {
      
$new_images .= "</tr>\n";
      
$count 0;
    }
  } 
// end while


Erste row immer "item-first"
Zweite row "item"
Und das letzte row immer "item-last"

Wie geht das? Hat da jemand eine Idee und kann mir da abhelfen?

VG

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Re: rows (first / row / last) - How to Add the First and Last Class
« Reply #1 on: March 26, 2016, 12:41:40 AM »