If you don’t need any special processing, this should do what you’re looking for
$lines = file($filename, FILE_IGNORE_NEW_LINES);
If you don’t need any special processing, this should do what you’re looking for
$lines = file($filename, FILE_IGNORE_NEW_LINES);