I've always browsed this site for PHP and Perl articles, but never needed to post before. anyway.
I've got a file that contains Intro text, a table with whitespace used to separate the columns, and a summary paragraph. The only parts of the file I care about are accessing three of the columns.
I need to access the AGC, TWC, and DWC fields below, and create a new file with only the values from those columns. I'm having difficulty figuring out how to open the file, and skip the paragraphs surrounding the data. Can anyone help me out? here's the data file
I have a similar question, in the mean time here is a possible start:
PHP Code:
$fileName="FILENAME.TXT";
$ft=fopen($fileName, "r") or die ("Unable to open the file $filename");
while(!feof($ft)){
$lines1 = fgets($ft);
$lines3 = explode(" ", $lines1);
print "$lines3[0]$lines3[1]$lines3[2]<br />";
}
fclose($ft);
Bookmarks