I have this script:
<?

$row = 1;
$fp = fopen ("test.txt","r");
while ($data = fgetcsv ($fp, 1000, "\t")) {
    $num = count ($data);
    $row++;
    for ($c=0; $c<$num; $c++) {
        print $data[$c] . "<br>";
    }
}
fclose ($fp);
     
?>
It reads a csv file (actually its tab seperated) into an array called $data.

When I call this in my browser, this is fine. But what I need to do is to 
put this information into a MySQL database...

The file contains these fields:
region
event_type
event_date
title
info
times
venue
price
event_id (this is auto_incrementing)

How do I read this file into the database?

Any help appreciated, as I have RTFM but I still no idea......



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to