Creating article system... need help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mistuh
Forum Newbie
Posts: 1
Joined: Fri Oct 11, 2002 3:53 am

Creating article system... need help

Post 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!
Coco
Forum Contributor
Posts: 339
Joined: Sat Sep 07, 2002 5:28 am
Location: Leeds, UK
Contact:

Post by Coco »

Post Reply