Hello,
A while ago i posted a question with almost the same intention.
But now it is different, i have resolved the previous question only to get another question.
I wil try too explain it as good as possible.
The goal is an article page display.
I have an MySQL db with an table called "artikelen".
This table contains the rows, "nicknaam","titel","artikel","id","datum".
The row "artikel" can contain text's from 200 words to up to 10.000 words. In this text can be the tags <B>, <i> and <img etc. >.
If the page is displayed i want the text's with more than 10.000 chars too be cut into more pages (every page 10.000 chars).
And if at the 99.990 char there is an <i> tag i want too close the tag at the end of the page and open the tag at the begin of the next page.
Also i do not want too cut up words and tags.
The remedy for this is this:
Make an flag $oktobreak. Then use strlen() too calculate if the page has too be cut in several pages.
If yes set the flag to TRUE. Then read the tekst char for char and keep an counter up. When there is an '<' set the flag to FALSE.
Go on with reading the text and remember the chars until there is an '>' store that and set the flag on TRUE.
When going thru the file always chack against the counter if you passed the break point, if yes and the flag is TRUE then you may break there.
Ok but how could i implement this and how can i make this idea better (I know there are faults in it).
I just have no idea how too do this.