RE: Paged Results Set in MySQL DB with one result

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[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?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux