RE: [PHP] Paged Results Set in MySQL DB with one result

From: Date: Wed, 03 May 2006 21:24:34 +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-235422@lists.php.net to get a copy of this message
[snip] Does anyone have any ideas?? [/snip] Quite frankly, yes. Question is, how many words do you want to show up on a 'page'? Is the design liquid or rigid? A basic formula (pseudo-code, will not actually work in the PHP parser); Select article body from database. Place all of the words in an array. Count the array. Divide that number by the number of words you wish to appear in a page. Split the array into the chunks described by the math. Place each chunk into a session variable. If the variable is identified as being the one to be displayed for this page, do it...if not, don't. Easy-peasy lemon squeezy, no?

« previous php.general (#235422) next »