table rows and tables are offset by 1 table (1 Viewer)

ajetrumpet

Banned
Local time
Yesterday, 19:06
Joined
Jun 22, 2007
Messages
5,638
all,

i have a log page that looks like this:



it is a log page of mine, and all of the tables are in line, titles, headers and then the rows. i made a sublog though, that i THOUGHT i wrote just like the other one, just with less code, and it looks like this:



the first table is not written under the first title, and the last table is written without a title. does anyone have any hints for me without me having to post the PHP code i wrote to get this? it's quite lengthly, and i'm not really sure where the bug is. thanks!
 

ajetrumpet

Banned
Local time
Yesterday, 19:06
Joined
Jun 22, 2007
Messages
5,638
i found the bug. i had forgotten to put a closing tag in the each table i was making. doh! :) after each record in the table, I had this:
PHP:
									echo '</tr>';
																} //CLOSE (26)
								                          } //CLOSE (29)
									echo "<br><br>";
 						   		} //CLOSE (28)
when I really should have had this:
PHP:
									echo '</tr>';
																} //CLOSE (26)
								                          } //CLOSE (29)
									echo '</table>';
									echo "<br><br>";
 						   		} //CLOSE (28)
i don't even want to think about WHY it was outputting what it was. one echo later, issue solved and output is correct. thread closed...
 

wiklendt

i recommend chocolate
Local time
Today, 10:06
Joined
Mar 10, 2008
Messages
1,746
i found the bug. i had forgotten to put a closing tag in the each table i was making. doh! :) after each record in the table, I had this:
PHP:
                                    echo '</tr>';
                                                                } //CLOSE (26)
                                                          } //CLOSE (29)
                                    echo "<br><br>";
                                    } //CLOSE (28)
when I really should have had this:
PHP:
                                    echo '</tr>';
                                                                } //CLOSE (26)
                                                          } //CLOSE (29)
                                    echo '</table>';
                                    echo "<br><br>";
                                    } //CLOSE (28)
i don't even want to think about WHY it was outputting what it was. one echo later, issue solved and output is correct. thread closed...


LOL - i remember having massive issues when i was learning HTML to remember to put in closing tags and also the 'end' double-quotation marks! i then started to use EditPad Pro, because it had syntax highlighting, so it made the mistakes fewer and fewer.... :) glad you sorted it out.
 

Users who are viewing this thread

Top Bottom