Re: How to get a certain line from a file

From: Date: Tue, 04 Feb 2003 18:14:31 +0000
Subject: Re: How to get a certain line from a file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-134308@lists.php.net to get a copy of this message
Real easy. Assuming you've read the data of the page into $data: $data = explode("\n",$data); $line = $data[36]; Just replace 36 with whatever line number you want. On Tue, 2003-02-04 at 13:50, The New Source wrote: How can I get a certain line from a file? If I get a file in this way: $f = fopen("http://www.url.com/index.htm","r"); How can I get a certain line of the file index.htm? I would need to get the line number 232, or lines from 232 to 238. How can I get this content? Thanx. Rodrigo -- Adam Voigt (adam@cryptocomm.com) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc

Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
« previous php.general (#134308) next »