General discussions related to php
Moderators: macek, egami, gesf
by LTLhawk » Mon Apr 28, 2003 8:42 am
Hi again,
I want to read some strings from a txt file. What is the best way to do this with php. fgets will get the entire line and fgetsc only gets a character...I want to read in each word as its own string....
thanks
-
LTLhawk
- New php-forum User

-
- Posts: 29
- Joined: Fri Mar 07, 2003 4:17 pm
by Redcircle » Tue Apr 29, 2003 2:30 am
$file_array = file("filename.txt");
that will read each line of the file into an array which is very convienent.
-

Redcircle
- Moderator

-
- Posts: 830
- Joined: Tue Jan 21, 2003 10:42 pm
- Location: Michigan USA
-
by LTLhawk » Tue Apr 29, 2003 3:25 am
ok thanks red
-
LTLhawk
- New php-forum User

-
- Posts: 29
- Joined: Fri Mar 07, 2003 4:17 pm
Return to PHP General
Who is online
Users browsing this forum: No registered users and 1 guest