Re: including() only given amount of lines

From: Date: Sat, 10 May 2003 16:45:36 +0000
Subject: Re: including() only given amount of lines
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-147123@lists.php.net to get a copy of this message
am 10.05.2003 15:44 Uhr schrieb Jason Wong unter php-general@gremlins.biz: > On Saturday 10 May 2003 19:53, iliketheworld@gmx.ch wrote: > >> 1. i would like to include only a given amount (the first 50) lines of a >> text file. i think they should be included using fgets() or fread() instead >> of include() but i dont know how. >> >> 2. besides that i need to include the laste 50 lines of a text file -- in >> reversed order! > > The easiest way would be to use file() and the array manipulation functions. yes, but isn't a 500+ line file a bit heavy to read into an array? i thought this may cause massive slow down -- isn't it? can someone help me with this? thanks for your effort! philipp http://www.ipdraw.org/

« previous php.general (#147123) next »