SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Evangelist
    Join Date
    Jun 2010
    Location
    Israel
    Posts
    523
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    making pagination with strlen

    Hello,
    I wanted to ask whats the best way and how to do pagination according to strlen
    I got a page which holds article, when the article gets too long i want to split it to pages and make a next/prev buttons.
    Any ideas?

    a small thing to note: i dont want words to be cut in the middle when splitting an article into pages.

    Thanks.

  2. #2
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    An article which is that long and isn't badly written will be split up into sections with headings, so you can find the first heading past the length and allocate that to the next page.

    Really and truthfully page separation is something that the author should be able to choose. Automating it can, and will, cause problems. The article author is a better judge of how their content should be laid out than a PHP script.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •