Re: Lines
| From: | Rafael Faria | Date: | Tue, 24 Apr 2001 20:03:25 +0000 |
| Subject: | Re: Lines | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-50156@lists.php.net to get a copy of this message | ||
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 Faria wrote:--- [ r a f a e l f a r i a] _____________________ _________________rafaelrfc@uol.com.br WebMaster Universo Online - http://www.uol.com.br Phone # +55 11 3038-8665Hey 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] _____________________ _________________rafaelrfc@uol.com.br WebMaster Universo Online - http://www.uol.com.br Phone # +55 11 3038-8665