News system in one file _or_ how to read lines from a file
| From: | Jesus Climent | Date: | Thu, 30 Nov 2000 14:36:21 +0000 |
| Subject: | News system in one file _or_ how to read lines from a file | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-28044@lists.php.net to get a copy of this message | ||
Hi all!
I have a kinnda small question.
I want to develope a news system. I have my frames (php includes) to
create the look&feel of my whole "portal" but I would like to create
something more.
To the facts...
I want the "index.php" in every dir to take a file from the current file,
called news_list.ext and, using some functions that I have already
created, do the following:
The format of the file is:
<item>
title....|date|author
text
<item>
....
and so on.
I want a piece of code that reads the very first line after <item> and
data=explodes ("|" , 1st_line), uses data[1], data[2] and data[3] to set
the table structure and reads the rest of the text as the news itself.
until it arrives to next item... and repeats again till the end of the
file.
Any help?
daTa