thesnarkie Posted June 18, 2009 Report Share Posted June 18, 2009 (edited) echo "<tr>"; while($myselect = mysql_fetch_assoc($show_all)) { echo "<td class='titlegreen' colspan='3'> <table border='0' cellspacing='1' cellpadding='1'> <tr><td style='background: url(http://i.meteorgames.com/ic/bg/000000_both_b48.png) no-repeat;'> <table border='0' cellspacing='0' cellpadding='0'> <tr><td style='background: url(" . $myselect['image'] . ") no-repeat;'> <table border='0' cellspacing='0' cellpadding='0'> <tr><td><img src='http://mgimg.net/ic/b/73d823_b48.png'></td></tr> </table> </td></tr> </table> </td></tr> </table> </td>"; } echo "</tr>"; Viņš sataisa rindu ar entajiem attēliem, bet kā lai uzraksta tā, ka viņš sataisa piecus un tad ņem jaunu rindu un atkal piecus un jaunu rindu? :) Edited June 18, 2009 by thesnarkie Quote Link to comment Share on other sites More sharing options...
marcis Posted June 18, 2009 Report Share Posted June 18, 2009 Katrs piektais būs tas, kura kārtas cipars dalās ar 5 bez atlikuma, pareizi? Īstenībā arī vairākkārt pārrunāta tēma. $i = 0; while(...){ ... if(++$i%5==0){ echo '</tr><tr>'; } } Quote Link to comment Share on other sites More sharing options...
thesnarkie Posted June 18, 2009 Author Report Share Posted June 18, 2009 Marci, paldies! (: 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.