RE: [PHP] Paged Results Set in MySQL DB with one result
| From: | Jay Blanchard | Date: | Thu, 04 May 2006 12:36:18 +0000 |
| Subject: | RE: [PHP] Paged Results Set in MySQL DB with one result | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-235487@lists.php.net to get a copy of this message | ||
[snip]
There's a fundamental problem with trying to slice text into
resizable web pages the same way it's sliced on paper. Paper pages
work because they're set in a fixed font size. When you change the
ratio of font size to column width, the places where lines of text
wrap changes. Because of the varying lengths of words, strings of
words spill over to the next line in non-linear rates. Unless you
use a fixed font size (boo, hiss) or you change the font size and the
column width at exactly the same rate by sizing your layout in ems,
your text columns are going to change in height (line-count) with
font resizing.
More ....
[/snip]
Paul states here more eloquently what I hinted at in my response in
terms liquid layouts, et. al. You must quit thinking of web pages in
print pages terms, a concept which may be more difficult than arrays.
Also, Jochem made a statement about allowing authors to determine
logical page breaks in their tomes, and he is correct. You'll see that
articles on Evolt, A List Apart, SitePoint and others are broken
logically (almost in chapters). This would be preferred.
I did use an array and sessions in my example because I want to save
round trips to the database. Using Jochem's suggestion with an HTML
comment you can achieve the same thing by placing the chunks of the
article between the comments into session variables.
The wheel here has been created many times and many ways.