|
-
Aug 7th, 2004, 02:32 PM
#1
Thread Starter
PowerPoster
Reading text files,[resolved]
How do you read ceratin lines of a text file with php?
Last edited by Pino; Aug 8th, 2004 at 03:53 AM.
-
Aug 7th, 2004, 10:37 PM
#2
Stuck in the 80s
If you want a certain line, the best way (IMO) is:
Code:
$fileContents = file('filename.txt');
echo $fileContents[1]; // will echo the second line
-
Aug 8th, 2004, 03:53 AM
#3
Thread Starter
PowerPoster
its that simple? wow i've been loading the whole file into a string then loopin through splitting it up but it was just getting confusing 
thanks i'll give it a hot tonight
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|