Read each line of txt file to new array element

If you don’t need any special processing, this should do what you’re looking for

$lines = file($filename, FILE_IGNORE_NEW_LINES);

Leave a Comment