RE: [PHP] Stripping the first line of a file

From: Date: Fri, 08 Feb 2002 15:21:57 +0000
Subject: RE: [PHP] Stripping the first line of a file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-83997@lists.php.net to get a copy of this message
Thank you! Works. I have a few more questions! I am working on converting a program from perl to PHP as it is the new language of choice at our office. I have been using printf statements in perl to format data. Is there a similar funtion in php? Here is an example from the perl program: printf NEW ("%-5.5s",$fields[14]); This will print exactly 5 characters, I also use this format to make sure the lines are exactly 255 characters long: printf NEW ("%-193.193s"); Is there something similar in php. Thanks for everyone's help and patience. -Scott On Fri, 8 Feb 2002, Jerry Verhoef (UGBI) wrote: > $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

« previous php.general (#83997) next »