|
Posted by Ivαn Sαnchez Ortega on 06/02/07 03:25
Peter Parker wrote:
> $numberOfPages = ceil($length/$charsPerPage);
This is plain false...
> $cutOffPoint= strripos(substr($all, $start, $charsPerPage),
> '<br><br>');
> $pageContent = substr($article, $start, $cutOffPoint-$start);
$cutOffPoint is relative to "substr($all, $start, $charsPerPage)", not
relative to $article. By the way, why do you have $all and $article??
Besides that, your algorithm doesn't take into account extreme cases: what
if I have no "<br>" at all in my article? What if my article is nothing but
a lot of "<br>"s?
--
----------------------------------
IvΓ‘n SΓ‘nchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
"Only sick music makes money today."
-- Friedrich Nietzsche [1844 - 1900]
Navigation:
[Reply to this message]
|