How can I make this smaller
| From: | Richard Kurth | Date: | Thu, 05 Apr 2001 20:40:54 +0000 |
| Subject: | How can I make this smaller | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-47325@lists.php.net to get a copy of this message | ||
Is there another way to write this I would like to make it smaller
also How would I write it so it is a function and I would be able to use all
the data throughout the whole program every time I try the rest of the
program does not see the data
if(file_exists("userdata")) {
$fp2=fopen ("userdata","r")or die("unable to open file ($userdata)");
flock($fp2, 2); //unless ($use_flock == 0);
while ($data = fgetcsv ($fp2, 1000, "|")) {
$num = count ($data);
$row++;
for ($c=0; $c<$num; $c++) {
}
$domain=$data[0];
$tld=$data[1];
$firstname=$data[2];
$lastname=$data[3];
$userid=$data[4];
$passw=$data[5]; this part would like to make smaller
$email=$data[6];
$package=$data[7];
$frontpage=$data[8];
$mysql=$data[9];
$userdatabase=$data[10];
$newuser =$data[11];
$newuserpass =$data[12];
}
//close and del file
fclose ($fp2);
system ("del userdata");