Re: Too many 'linespaces'

From: Date: Tue, 28 Jan 2003 02:47:05 +0000
Subject: Re: Too many 'linespaces'
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-133337@lists.php.net to get a copy of this message
You mean to comment out the while sentence? A do-while-loop won't work without the while-part would it? Comments are suplements to understand the code, not needed for the code to work. Thanks anyway "Tom Rogers" <trogers@kwikin.com> skrev i melding news:5745208776.20030128123832@kwikin.com... > Hi, > > Tuesday, January 28, 2003, 12:24:21 PM, you wrote: > LE> Hello, > > LE> I present some content of a mysql-table in an html-table. When the query > LE> which collects the content contains few rows I get the amount of space I > LE> want between the output and the above content. But when I get for instance > LE> 60 rows, the printed result jumps down about 7 lines. I would like to have > LE> the same small gap between the result of the query and the above content. > > LE> The code is as follows: > > LE> ......snip......... > > LE> <table width="100%" cellpadding="0" > LE> class="alle"> > LE> <tr> > LE> <td> &nbsp;<strong><?php echo > LE> $row_Recordset1['mModell']; ?></strong> > LE> </td> > LE> <td align="right">&nbsp; </td> > LE> </tr> > > LE> <tr> > LE> <td colspan="2"> > LE> <?php > LE> //checks if there exists any rows > LE> if($totalRows_Recordset1 > 0) { > LE> ?> > > LE> <table width="70%" border="0"> > LE> <tr> > LE> ..........around here the printed result jumps many rows down > LE> <td><strong>Kontonr.</strong></td> > LE> <td><strong>Delkontonr.</strong></td> > LE> <td><strong>Tekst</strong></td> > LE> <td><strong>Kostnad</strong></td> > LE> <td><strong>Enhet</strong></td> > LE> </tr> > LE> <tr><td colspan="5"></td></tr> > LE> <?php do { > LE> $kontonr = $row_Recordset1['mKontonr']; > LE> $delkontonr = $row_Recordset1['mDelkontonr']; > LE> if ($delkontonr == 0) { $strong = '<strong>'; $strong2 = > LE> '</strong>'; } > LE> else { $strong = ''; $strong2 = ''; } > LE> ?> > LE> <tr> > LE> <td><?php echo $strong . > LE> fjern_null($row_Recordset1['mHovedkonto']) . $strong2; ?></td> > LE> <td><?php echo $strong . > LE> $row_Recordset1['mDelkontonr'] . $strong2; ?></td> > LE> <td><?php echo $strong . > LE> $row_Recordset1['mKontotekst'] . $strong2; ?></td> > LE> <td><?php echo $strong . > LE> fjern_null($row_Recordset1['mKostnad']) . $strong2; ?></td> > LE> <td><?php echo $strong . $row_Recordset1['mEnhet'] . > $strong2; ?>></td> > LE> </tr> > LE> <!--<input name="modell" type="hidden" value="<?php > //echo $modell; ?>>">--> > LE> <input name="modellId" type="hidden" > LE> value="<?php echo > LE> $row_Recordset1['modellId']; ?>"> > LE> <?php } while ($row_Recordset1 = > LE> mysql_fetch_assoc($Recordset1)); ?> > LE> </table> > > > > LE> <?php > LE> } //if($totalRows_Recordset1 > 0) { > LE> ?> > LE> </td> > LE> </tr> > LE> </table> > > LE> ...... and so on ............ > > > LE> When the query returns 60 rows I get ca. 7 blank lines between <?php echo > LE> $row_Recordset1['mModell']; ?> and Kontonr. > > LE> Does anyone understand? Anyone have a tip? > > LE> Thanks a lot! > > LE> Lars > > > > > maybe this line needs changing <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> > to: > <?php }// while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> > > I think you need the comment > > -- > regards, > Tom >

« previous php.general (#133337) next »