Jump to content

Print every 3 rows


Canman2005

Recommended Posts

Hi all

 

I have a simple QUERY, it looks like

 

$sql = "SELECT * FROM mydata WHERE uid = 22";
$show = @mysql_query($sql,$connection) or die(mysql_error());
while ($row = mysql_fetch_array($show))
{
print $row['title'];
print "<br>";
}

 

I want to print a few full stops (........) after every 3 rows returned.

 

So the results may look like

 

title 1

title 2

title 3

...........

title 4

title 5

title 6

...........

title 7

 

Can anyone help me?

 

Thanks in advance

 

Dave

Link to comment
https://forums.phpfreaks.com/topic/75214-print-every-3-rows/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.