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);
?>

Page Comments (Click to edit)






[Click to add or edit comments])

Please prepend comments below including a date

Design by N.Design Studio, adapted by solidGone.org (version 1.0.0)
Have a nice day.