foreach($articles as $row) { $i++; $class_second = ''; if($i%2==0)$class_second='second_news';