pulling data out of a text file

From: Date: Thu, 28 Dec 2000 04:14:48 +0000
Subject: pulling data out of a text file
Groups: php.general 
Request: Send a blank email to php-general+get-32036@lists.php.net to get a copy of this message
I cannot seem to figure this out after many hours of looking at the list archives and playing with different things it still will not do what I what it to. I want it to fill the variables with what is in the userdata file. The userdata file looks like this newdomain,.com,Company,Firstname,Name,Street Adress 1,12345, Small Town,,,customer@somedomain.com,Pack1,no,no,no The script I am using looks like this so what am I doing wrong. $fp=fopen ("userdata","r")or die("unable to open file ($userdata)"); flock($fp, 2); //unless ($use_flock == 0); while (!feof ($fp)) { $row=explode(',',$fp); } $row[0]= $domain; $row[1]=$tld; $row[2]=$company; $row[3]=$firstname; $row[4]=$lastname; $row[5]=$address; $row[6]=$zip; $row[7]=$city; $row[8]=$telephone; $row[9]=$fax; $row[10]=$email; $row[11]=$package; $row[12]=$frontpage; $row[13]=$mysql; $row[14]=$change_registrar;

« previous php.general (#32036) next »