extracting data from text file
| From: | rdkurth at starband dot net | Date: | Mon, 01 Jul 2002 21:17:27 +0000 |
| Subject: | extracting data from text file | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-104783@lists.php.net to get a copy of this message | ||
Hello ,
I have a text file that looks like this. each entry is on a different
line I need to pull the data out of
it and put each line of data into its own variable
US
State
City
Company Name
Section 2
www.domain.com
admin@www.domain.com
I have trend this but it does not work properly
$fp = @fopen(file.txt,"r");
$line = explode("\n",$fp);
$valueC = "$line[0]";
$valueST = "$line[1]";
@fclose($fp);
--
Best regards,
rdkurth mailto:rdkurth@starband.net