Tosok Posted September 17, 2007 Share Posted September 17, 2007 Yikes! I feel like a pup in the pen with the big dogs here! Hoping ya'll are nice Really, I'm a preschooler in PHP and have run into a situation that is way beyond my present ability. Not even sure if I'm asking the right question to the right people. But here goes: I'm grabbing an article from our MySQL table "truthquest" from the "truthquest_text" field. The content is diplayed in an "index.php" file. Works fine. The problem is that the article should really be broken into two or more pages because of it's length. Is there a simple way to get the page to display a certain amount of words and then generate a "next page" link, and then automatically create another page where the rest of the article would then appear? Thanks for your consideration! Quote Link to comment https://forums.phpfreaks.com/topic/69659-is-this-possible/ Share on other sites More sharing options...
rarebit Posted September 17, 2007 Share Posted September 17, 2007 Not really, you'll have to decide on a limit say 1000 chars, then use 'substr($s, $start, 1000)' to extract sections. Work out how many sections with 'strlen(s) / 1000', make links with a $_GET such as 'sect=3'... hope this helps! Quote Link to comment https://forums.phpfreaks.com/topic/69659-is-this-possible/#findComment-350011 Share on other sites More sharing options...
cooldude832 Posted September 17, 2007 Share Posted September 17, 2007 that or an attractive solution for output is the iframe which you could place the article in and it would be scrollable inside the page, allowing a lot of content to fit in a small container ideally. Quote Link to comment https://forums.phpfreaks.com/topic/69659-is-this-possible/#findComment-350017 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.