Re: Lines

From: Date: Tue, 24 Apr 2001 20:02:50 +0000
Subject: Re: Lines
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-50155@lists.php.net to get a copy of this message
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 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


« previous php.general (#50155) next »