npsari Posted May 13, 2008 Share Posted May 13, 2008 I have this little query $q = "SELECT * FROM friends ORDER BY Date DESC, Time DESC LIMIT 40;"; $res = @mysql_query($q,$con); while($r = @mysql_fetch_array($res)){ ////BIG WHILEEEEEEE print "<A href='/profile.php?friendID={$r['FriendID']}'>View profile</A>"; } I want every 4 results, a line to show print"<hr noshade size=\"2\" width=\"100%\" color=\"#000000\" >"; How can i do this Link to comment https://forums.phpfreaks.com/topic/105389-ok-a-silly-question/ Share on other sites More sharing options...
jaymc Posted May 13, 2008 Share Posted May 13, 2008 while($r = @mysql_fetch_array($res)){ ////BIG WHILEEEEEEE $i++; if ($i == 4) { print"<hr noshade size=\"2\" width=\"100%\" color=\"#000000\" >"; $i = 0; } REST OF CODE } Link to comment https://forums.phpfreaks.com/topic/105389-ok-a-silly-question/#findComment-539745 Share on other sites More sharing options...
npsari Posted May 13, 2008 Author Share Posted May 13, 2008 U r my main man Done it Link to comment https://forums.phpfreaks.com/topic/105389-ok-a-silly-question/#findComment-539746 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.