PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
ryuujin7619
Forum Newbie
Posts: 2 Joined: Thu Feb 24, 2005 11:34 am
Post
by ryuujin7619 » Thu Feb 24, 2005 11:40 am
I was wondering if there was a way to read an entire file into an array, like the perl construction:
Code: Select all
open(FILE, "filename");
@data = <FILE>;
close(FILE);
Is there a good wqay to do this in PHP, or would I have to parse through the entire file line by line?
Thanks for your help!
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Thu Feb 24, 2005 11:45 am
ryuujin7619
Forum Newbie
Posts: 2 Joined: Thu Feb 24, 2005 11:34 am
Post
by ryuujin7619 » Thu Feb 24, 2005 10:13 pm
I was reading the manual, I must have just missed that page. Thank you for your help.
smpdawg
Forum Contributor
Posts: 292 Joined: Thu Jan 27, 2005 3:10 pm
Location: Houston, TX
Contact:
Post
by smpdawg » Thu Feb 24, 2005 10:17 pm
Don't feel bad, I missed it too.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Thu Feb 24, 2005 10:19 pm
it's somewhat understandable.. the function name isn't exactly informative, nor suggestive of it's nature.. plus it's real short
no big deal, either way.
smpdawg
Forum Contributor
Posts: 292 Joined: Thu Jan 27, 2005 3:10 pm
Location: Houston, TX
Contact:
Post
by smpdawg » Thu Feb 24, 2005 10:22 pm
feyd - I've been meaning to ask you if you ever sleep LOL. I see post after post all the time from you but I have learned a lot from being on here.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Thu Feb 24, 2005 10:30 pm
there's a few hours I sleep.. not many
although my online time here should drop in the next six months (starting school.. again) weee..
but enough off topic nonsense..
although patrik will testify that I'm a robot/clone.