View Single Post
Scoochi2
x10 Sophmore

Scoochi2's Avatar

Join Date: Aug 2008
Posts: 131
Credits: 1,387
Scoochi2 has a spectacular aura about
Location: Southport!

Quote  
09-16-2008, 02:51 PM
Re: Insert records from a local csv file

yeah, the csv file will need to be uploaded onto *a* server. Not necessarily your server, any will do so long as your script has the permissions needed to read it.
Once the script is online, you can do something along the lines of the following in order to convert the file into an array in your PHP script:

PHP Code:
$file 'location of file';
$array explode(',',file_get_contents($file)); 
Then, it's as simple as using a foreach to get all values of $array into your database

Alternatively, use a textarea form and get the list from $_POST
__________________
If anyone can see it, my post was meant for anyone who reads it. Don't take it personally or think I'm being condescending...
Reply With Quote
Scoochi2 is offlineReport Post