James Ham James Ham - 3 months ago 7
PHP Question

PHP <BR> After 2 loops

I wanted to add

<br>
after every 2 loops.

The loop will run 8 times and after every 2 loops I want to add
<br>


Can anyone help?

The loop will look like this:

while($row = mysql_fetch_array( $result2 )) {

}

Answer
$c=0;
while($row = mysql_fetch_array( $result2 )) {
     //PUSH YOUR CODE
     $c++;
     if($c%2==0)
         echo "<br/>";
}