RE: [PHP] Lines

2001-04-25 Thread Rafael Faria
L PROTECTED] > www.phpbeginner.com > > > >-Original Message- >From: Jason Murray [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, April 25, 2001 4:52 PM >To: Maxim Maletsky; 'Rafael Faria'; [EMAIL PROTECTED] >Subject: RE: [PHP] Lines > > > > > it

RE: [PHP] Lines

2001-04-25 Thread Jason Murray
> > it's my first post on this list, and my doubt is... > > > > how can i take a file.txt and > > > > 1 - know how many lines i have in this text > > 2 - print line 5 until 10 > Is there any chance for you to use a database? > these thing would become MUCH, MUCH easier. Actually, this is reall

RE: [PHP] Lines

2001-04-25 Thread Jason Murray
> I know, it was already answered before me (you), > > I just though that an SQL database is a good advice for these > who are trying to do this kind of jobs. It is obvious that the > reason to use this function is to manage a stored data in files. > then why not a database, if possible? I did

RE: [PHP] Lines

2001-04-25 Thread Maxim Maletsky
]] Sent: Wednesday, April 25, 2001 4:59 AM To: [EMAIL PROTECTED] Subject: [PHP] Lines Hey Guys, it's my first post on this list, and my doubt is... how can i take a file.txt and 1 - know how many lines i have in this text 2 - print line 5 until 10 ? can someone help me? --- [ r a

RE: [PHP] Lines

2001-04-25 Thread Maxim Maletsky
ubject: RE: [PHP] Lines > > it's my first post on this list, and my doubt is... > > > > how can i take a file.txt and > > > > 1 - know how many lines i have in this text > > 2 - print line 5 until 10 > Is there any chance for you to use a database? > th

Re: [PHP] Lines

2001-04-24 Thread Chris Anderson
$Data = file("data.dat"); $Total = count($data); That would get the lines from the file and give $total the number of lines. - Original Message - From: "Rafael Faria" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 24, 2001 4:03 PM Subj

RE: [PHP] Lines

2001-04-24 Thread Boget, Chris
> > If you use the file() function to open up the file, it will > > put each line of the file into an array. At that point you > > can say: > But how can i put into a var $total the total lines that i > have into the file? After you've used the file() function as suggestion above, the total n

Re: [PHP] Lines

2001-04-24 Thread Rafael Faria
But how can i put into a var $total the total lines that i have into the file? Rafael >f you use the file() function to open up the file, it will put each line >of the file into an array. At that point you can say: > >for($i=5;$i<11;$i++){ > >print $myFile[$i]; > >} > > >Michael > > >Rafael Fa

Re: [PHP] Lines

2001-04-24 Thread Michael Stearne
If you use the file() function to open up the file, it will put each line of the file into an array. At that point you can say: for($i=5;$i<11;$i++){ print $myFile[$i]; } Michael Rafael Faria wrote: > > > Hey Guys, > it's my first post on this list, and my doubt is... > > how can i take

[PHP] Lines

2001-04-24 Thread Rafael Faria
Hey Guys, it's my first post on this list, and my doubt is... how can i take a file.txt and 1 - know how many lines i have in this text 2 - print line 5 until 10 ? can someone help me? --- [ r a f a e l f a r i a] _ [EMAIL PROTECTED] WebMaster Universo Online - ht