Re: chunk_split();
| From: | Martin Luethi | Date: | Wed, 28 Jan 2004 16:57:57 +0000 |
| Subject: | Re: chunk_split(); | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-176074@lists.php.net to get a copy of this message | ||
Wed, 28 Jan 2004 11:41:56 -0500 Benjamin Trépanier
<creation@communicationartistique.com>:
On 28/01/04 11:29, "Martin Luethi" <php@humbapa.ch> wrote: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. tinumaybe 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 <creation@communicationartistique.com>: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...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