View Full Version : table rows and tables are offset by 1 table


ajetrumpet
09-05-2009, 04:48 PM
all,

i have a log page that looks like this:

http://www.neuroprosystems.com/images/forums/cf/9_5_09(1).jpg

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:

http://www.neuroprosystems.com/images/forums/cf/9_5_09(2).jpg

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
09-06-2009, 03:24 PM
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: echo '</tr>';
} //CLOSE (26)
} //CLOSE (29)
echo "<br><br>";
} //CLOSE (28)
when I really should have had this: 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
09-06-2009, 05:14 PM
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: echo '</tr>';
} //CLOSE (26)
} //CLOSE (29)
echo "<br><br>";
} //CLOSE (28)
when I really should have had this: 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.