Page 1 of 1

Creating article system... need help

Posted: Fri Oct 11, 2002 3:53 am
by mistuh
Hey,
im starting a script for my articles..
pseudo:
Longtext mysql field containing the entire article story.
mysql_fetch_array gets the article story.
and echo's it...

But I want to display the article over a few pages..
Like i want to get the $fetcharray['story'] and split the string into chunks..
Like say every 255 chars...
So it would display the first 255 chars followed by a 'Next Page' link.
Which will show the next 255 chars from the previous 255 chars.

That is my problem i have no idea on how to get the split string into variables to use over multiple pages.
I have viewed the PHP Manual and the only thing i can find close to my needs is the chunk_split function

Code: Select all

$new_string = chunk_split(base64_encode($data));
Still no idea on puttin it into an array or etc...
Any help much appreciated!

Posted: Fri Oct 11, 2002 5:51 am
by Coco