Reply to Re: pagination

Your name:

Reply:


Posted by Peter Parker on 06/02/07 03:46

Sorry, it should have been '$article' instead of '$all'. I renamed and
missed that one when I posted onto newsgroup. The article format is created
by me so I make sure the format holds. I did print it out to verify. It
contains only text strings in English language with single newline as <br>
and double newlines for new paragraph as <br><br>. Thanks.


"Ivαn Sαnchez Ortega" <ivansanchez-alg@rroba-escomposlinux.-.punto.-.org>
wrote in message news:f3qns5$iis$1@hercules.cohp1...
> 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]

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация