How to find out unclosed html elements?
I have some content with html elements. I need to do pagination according to the “page break” string. In the middle of the content there are so many page break string available. With the help of the page break string i have divided the content into number of pages.
The probleme here is some html element may close in the second page or third page or etc. I need to find out the unclosed tags of the pages. I should close those tags in those pages and reopen those tags into the next pages and so on.
Please help me!
Thank you so much.
Run your output past a validator... best way to find them.
Though if your opening and closing tags are in different php files, there's probably something horribly wrong with your planning -- though that's why I like to have a theme.php file that has functions for opening and closing sections, and output of what goes in-between... that way the actual output code isn't merged into my data retrieval/generation.
Basically, if you're having those types of issues, how you're building your php could be the real problem. Do you have an example of the code where you are having those types of problems? If we see what you are doing, I'm certain any number of people here could coach you in better ways of building code to avoid those types of problems.