News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Lorenzo Alberton's Blog:
Navigation Through Paragraphs in an Article
October 16, 2006 @ 08:53:00

Following the PEAR::Pager class theme, Lorenzo Alberton has posted another pagination tutorial today with a look at using the package to "paginate" through the paragraphs of an article quickly and easily.

Users often prefer reading short chunks of text instead of scrolling a very long page (unless they want to print the page, then the opposite applies). In this tutorial, we're going to see how we can build an article pagination system, with a little help from PEAR::Pager.

Lorenzo provides both the database structure and sample data to work off of as well as (obviously) the code to make it all happen. The script is pretty straight-forward, especially if you've looked through his previous tutorial using the same class. Since the paragraphs are broken up into different rows in the database, it makes it simple to pull them out just like the pages of the articles before.

He also includes some alternative navigation styles to help make things look a bit different - a drop-down, an article summary (of the sections), and a printer-friendly version.

0 comments voice your opinion now!
pagination pear pager package tutorial paragraphs pagination pear pager package tutorial paragraphs


blog comments powered by Disqus

Similar Posts

Make Me Pulse: Using the Zend Framework URL rewriting

Adam Gotterer's Blog: Building an Object Collection Manager with the Standard PHP Library (SPL)

Sameer Borate: Integrating Googles new reCAPTCHA in PHP

Script-Tutorials.com: Creating a Smooth Curve Graphs with PHP and GD

Jason Gilmore's Blog: How I Learned to Stop Worrying and Love Zend_Form


Community Events

Don't see your event here?
Let us know!


voicesoftheelephpant interview unittest laravel release library laravel5 introduction language api podcast version extension framework php7 community series conference example opinion

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework