[thelist] Splitting Articles across multiple pages with PHP

jon steele jjsteele22 at yahoo.com
Thu Jan 31 08:54:00 CST 2002


I built a small php srticle system like this a while back. I used what Jay recommended. I put a
delimiter in the form of a comment with the title which should be shown in the "Next Page" link.
The code also made a small list of all segments in article at top of every article page, using
this title. The page delimiters looked like:

text text text...
<!-- Title_of_next_segment -->
text text text...
<!-- Title_of_next_segment -->
...

If you want the code to play around with, email me later on, or I will post it to the list later
(I don't have access to it right now :).

Jon

--- Jay Greenspan <jay at trans-city.com> wrote:
> On Thursday, January 31, 2002, at 05:34 AM, Norman Beresford wrote:
>
> > The problem with doing it the way you want to is that it's going to look
> > quite strange with sentences stopping midway though etc etc.
>
>
> Yeah, this would be a problem. To get the exact page breaks you want,
> you might want to consider investing the time to insert XML-like tags in
> your text. Something like
>
> <page_1>
> ...
> </page_1>
>
> <page_2>
> ...
> </page_2>
>
> Then, even without an XML parser, it would be easy enough to get the
> section you were after, witch either a regular expression or string
> handling functions.
>
> Just a thought, I've never actually implemented this type of setup.
>
> -j
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!
http://auctions.yahoo.com



More information about the thelist mailing list