If you use the <pagebreak> method, you could use: $part = explode("<pagebreak>",$text);
to break apart the essay. Then echo $part[0] for page 1, $part[1] for page 2, etc... I'm sure there are other ways. ---John Holmes... ----- Original Message ----- From: "Alan McCoy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 20, 2003 10:11 AM Subject: [PHP] Splitting Article Into Multiple Pages Greetings! I have a MySQL database of essays that contain some pretty long articles. I'm using PHP and instead of throwing all the text up on one mile-long page, I'd like to be able to automagically break up the article among multiple pages. I had thought about using multiple text areas for breaking up the story when it is published, but fear it may be a bit cumbersome for the writers. They might be able to handle putting in a tag (like <pagebreak>) to signify page breaks in the text if it's possible that PHP could spot the tags and split it into separate pages accordingly. Any thoughts on this (or where to find sample code to get me started) would be greatly appreciated! Thanks! Alan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php