Jump to content

Recommended Posts

I believe on some websites they use a special tag like:

 

=== BREAK ===

 

or something .. in which case you could explode the text by "=== BREAK ===" then have say "?page=2" in the URL and return the text at that index of the array. So something like:

 

// assuming $article contains the text

$page = (!$_GET['page']) 0 : (int) $_GET['page'] - 1;

$article_pages = explode("=== BREAK ===", $article);

echo $article_pages[$page];

 

.. not tested but it's just a quick idea.

 

Adam

 

No not really...you did say you want it to break at specific spots... If you were wanting it to break every 100 words or something, or every x paragraph tag, etc..then sure.  The key is that you have to establish a pattern.  If there's no pattern, then you have to use something as a marker, like a [pagebreak] tag. 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.