Use 

$aFile=file(<FILENAME>);

//$aFile[0] contains the unwanted line
echo $aFile[1]; // displays line 2
echo $aFile[n]; // displays line n where n is an positieve interger and not
greater then the number of lines in the file

http://www.php.net/manual/en/function.file.php

HTH
Jerry


> -----Original Message-----
> From: Scott [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 08, 2002 4:02 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Stripping the first line of a file
> 
> 
> Hi,
> 
> I want to be able to open a file and then strip the first 
> line of it off.  
> Example, the first line contains the names for tables in a 
> database and 
> all I need is from the second line on.  
> 
> if I fopen a file can I strip the line or should I process it 
> and then 
> drop the data from the first row?
> 
> Thanks,
> -Scott
> 
> 
> -- 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


The information contained in this email is confidential and
may be legally privileged. It is intended solely for the 
addressee. Access to this email by anyone else is 
unauthorized. If you are not the intended recipient, any 
form of disclosure, production, distribution or any action 
taken or refrained from in reliance on it, is prohibited and 
may be unlawful. Please notify the sender immediately.

The content of the email is not legally binding unless 
confirmed by letter bearing two authorized signatures.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to