Here is the function, this will take a file name, and return you an array.
$content = file_get_contents($file);
$lines = preg_split('/\n/', $content);
To call the function read_file_at_array(), just provide the file name. For example the below code.
$lines = read_file_at_array("input.txt");
That's it. So simple. But remember, if your file name is too large, this function will not be efficient. I mean to load the whole large file into an array is not a good thing.