Wed, 28 Jan 2004 11:41:56 -0500 Benjamin  Trépanier
<[EMAIL PROTECTED]>:

On 28/01/04 11:29, "Martin Luethi" <[EMAIL PROTECTED]> wrote:

maybe its better to use fread() and fseek()

2000 bytes should be 2000 characters in a textfile

g. tinu


Wed, 28 Jan 2004 11:20:32 -0500 Benjamin Trépanier <[EMAIL PROTECTED]>:
Hi,

I am using the chunk_split(); function to separe a long long text on
differents pages.
At this time, I can split the string into x sections of 2000 characters.

Now I need to show only the first 2000 .
when user click on page #2, itĹs reloading and show the next 2000
characters... If he click the page 4 button, itĹs going to the 6000th
caracters and it show his next 2000.. etc...

How can I split this text on many pages without loosing any characters??
Maybe the chunk_split function is not the good one...

Thanks

Ben

Interesting but my text are from a mySQL DB so, I have to split a text who
is content in a variable.. chunk_split($text)


What Ca I do? Is there a way to told the server brings me caracters (1,2000) and after by an incrementation 2001- 4001 etc...

you can use $text = chunk_split($text, 2000, "<MYTAG>"); to insert "<MYTAG>" after every 2000 chars. with $testarray = split("<MYTAG>", $text); you get an array with your data (each entry is 2000 chars, "<MYTAG>" is removed) "<MYTAG>" can be anything, just make sure that it never occurs inside the data from mysql.

g. tinu

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



Reply via email to