What is the function of FILE_IGNORE_NEW_LINES when using file() in PHP?

When using the file() function in PHP to read a file into an array, by default, each line of the file will include a newline character at the end. If you want to exclude these newline characters from the array elements, you can use the FILE_IGNORE_NEW_LINES flag as the second parameter of the file() function.

// Read a file into an array without including newline characters
$fileLines = file('example.txt', FILE_IGNORE_NEW_LINES);

// Print the array without newline characters
foreach ($fileLines as $line) {
    echo $line . "<br>";
}