I am trying to read every line of a text file into an array and have each line in a new element.
My code so far.
<?php
$file = fopen("members.txt", "r");
$i = 0;
while (!feof($file)) {
$line_of_text = fgets($file);
$members = explode('\n', $line_of_text);
fclose($file);
?>
If you don't need any special processing, this should do what you're looking for
$lines = file($filename, FILE_IGNORE_NEW_LINES);