joined:June 15, 2006
How do i import a CSV file that is zipped.
CSV file = xyz.txt
Zipped file = xyz_zip.zip
I have worked on the following code to get the whole xyt.txt date into a variable ($content).
$zip = zip_open("xyz_zip.zip");
while ($zip_entry = zip_read($zip))
if (zip_entry_open($zip, $zip_entry))
$contents = zip_entry_read($zip_entry,zip_entry_filesize($zip_entry));
echo "$contents<br />";
The problem is that fopen() need a CSV file but i have is a variable with the content of the CSV file.
How do i import $content data into mysql database ?