Re: News system in one file _or_ how to read lines from a file
| From: | Jesus Climent | Date: | Thu, 30 Nov 2000 14:44:30 +0000 |
| Subject: | Re: News system in one file _or_ how to read lines from a file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-28048@lists.php.net to get a copy of this message | ||
On Thu, 30 Nov 2000, ext Jason Lavigne wrote:
> > 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?
How can i read just the 1st line after every <item>?
How can I count the number of <items> to use in if{} statements?
daTa