tikkai maacos Posted January 28, 2008 Report Share Posted January 28, 2008 Labdien! lieta sekojosha! Man vajag lai dati tiktu izvadiiti tabula piecaas kolonaas un visu laiku uz leju! bet lieta taada nekaadiigi man nesanaak.. ja pielietoju if else tad pasaakums apstaajas pie pirmaas rindas... a man vajag lai rinad buutu neierobezjoti daudz... ar sho es panaacu ka visu izvada vienaa rindaa... $result = mysql_query("SELECT * FROM dati"); echo "<center><table border='0' ><tr>"; $i=0 ; while($row = mysql_fetch_array($result) ) { echo $i++; echo "<td><img border=0 src=". $row['image'] ." width=100 height=25>"; } echo "</td></tr></table><br><br><br>"; vai var luudzu kaads paliidzeet.. Link to comment Share on other sites More sharing options...
marcis Posted January 28, 2008 Report Share Posted January 28, 2008 (edited) Nu un kur problēma? Kur tev kādu if'u? Tabulu nemāki html'ā uztaisīt? echo '<table>'; while(...){ echo '<tr>'; echo '<td></td>'; echo '<td></td>'; echo '<td></td>'; echo '<td></td>'; echo '<td></td>'; echo '</tr>'; } echo '</table>'; EDIT: andrisp zemāk pieminētā kļūda Edited January 28, 2008 by marcis Link to comment Share on other sites More sharing options...
andrisp Posted January 28, 2008 Report Share Posted January 28, 2008 marcis, <tr> tagiem jābut iekš while() {} cikla. Link to comment Share on other sites More sharing options...
tikkai maacos Posted January 28, 2008 Author Report Share Posted January 28, 2008 Nu un kur problēma? Kur tev kādu if'u?Tabulu nemāki html'ā uztaisīt? echo '<table>'; while(...){ echo '<tr>'; echo '<td></td>'; echo '<td></td>'; echo '<td></td>'; echo '<td></td>'; echo '<td></td>'; echo '</tr>'; } echo '</table>'; EDIT: andrisp zemāk pieminētā kļūda maacee ta maaku.. vienk juus domu nesparataat... paldies pats tiku galaa... ar cikliem.. Varam taisiit ciet! Link to comment Share on other sites More sharing options...
Recommended Posts