Canman2005 Posted October 29, 2007 Share Posted October 29, 2007 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 Quote Link to comment Share on other sites More sharing options...
Barand Posted October 29, 2007 Share Posted October 29, 2007 <?php $i = 0; while ($row = mysql_fetch_array($show)) { print $row['locname']; print "<br>"; if (++$i%3==0) echo '.....................', '<br>'; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.