I'm wanting to format the output from a tsv file nicely into a table structure complete with links, and I've managed to read from the file and separate the tab separated values.....but I'm not sure how to put each field of each line into an array so I can use them.
heres what I've got so far:
<?php
//go get file from moreover.com
$fp = fopen ("http://r.moreover.com/cgi-local/page?index_popmusic+pctsv","r");
//separate tabbed values
while ($data = fgetcsv ($fp, 1000, "\t")) {
$num = count ($data);
for ($c=0; $c<$num; $c++) {
print $data[$c] . "<br>";
}
}
fclose ($fp);
?>
Now how can I get it so I can use each value like $value["1"] $value["2"] etc.?
rgds,
scott d`