Flags to remove line endings in the file() function
The file() function adds a line ending to each entry. You can have it removed, and ignore blank lines by throwing a couple flags as so,
<?php
# $referers is a file that contains one URL on each line. Not important to this example.
$a_referer_list = file($referers,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
?>
# $referers is a file that contains one URL on each line. Not important to this example.
$a_referer_list = file($referers,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
?>
[Click to add or edit comments])
Please prepend comments below including a date