PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
if ( ! $file = file("CSV FILENAME", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)) die ('Could not open input file');
$match = "No";
foreach($file as $line)
{
print_r($file);
}
instead of using file(), try using file_get_contents(). Read the comments on that page... you may find them helpful, especially this one:
A UTF-8 issue I've encountered is that of reading a URL with a non-UTF-8 encoding that is later displayed improperly since file_get_contents() related to it as UTF-8. This small function should show you how to address this issue: