Well, here are the list of mistakes
1. you've closed a tag twice (like <a href="" /> </a>)
2. Try to use <?php instead of <?
3. If class of li tags have to change after first two li items code should be
<?php
echo "<ul class='services-list'>";
//echo "<li class='bubble'>";
$i = 1;
foreach ($rows_class as $record_class ){
if($i!=1) {echo "</li>\n";}
if( $record_class === end($rows_class) ) {
echo "\n";
}
else if($i <= 2) {
echo "<li class='bubble'>";
}
else {
echo "</li>\n<li class='bubble last'>\n";
}
$string = $record_class['description'];
?>
<a href="viewclass.php?class_id=<?php echo base64_encode($record_class[class_id]) ?>">
<h6 class="title"><img src="./images/services/picture-services.png"
class="picture" alt="logo" />
<?php echo $record_class[class_title]; ?>
</h6></a>
<p>
<?php
echo substr(strip_tags($string), 0, 200);
?>
</p>
<?php
$i++;
}
?>
</ul>
Hope this helps.