<?php
$filename = "file.csv"; $file = fopen($filename, "r"); $read = fread($file, filesize($filename));
$split = array_unique(explode("\n", $read));
fclose($file);
$filename2 = "other.csv";
$file2 = fopen($filename2, "a");
foreach($split as $key=>$value) {
if($value != "") {
fwrite($file2, $value . "\n");
}
}
fclose($file2);
echo "Update done successfully."; ?>
0 comments:
Post a Comment
Thanks