View Full Version : copy content of text file in variable
06-05-2004, 05:36 AM
How can I take the content of a text file and store it in a variable?
What I ultimatly want to do is take that variable, extract what I want with regular expression and write that out..
So if you could also point me to some good regular expression tutorial, that would be great.
06-05-2004, 05:38 AM
try using fread
06-05-2004, 05:39 AM
I don't understant fread, why do I have to give the filesize and stuff? Why can't I just read the whole file?
06-05-2004, 05:53 AM
Here is the code I got.
How would I now use regular expression for get only te desired part of the text file?
my text file contains this:
I want to make a function like this:
$newString=regexp($string) //This should give me:
06-05-2004, 08:13 AM
What I think is the best and most understandable tutorial on Regex on the net.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.