file

file -- read entire file into an array

Description

array file (string filename);

Identical to readfile() , except that file() returns the file in an array. Each element of the array corresponds to a line in the file, with the newline still attached.

See also readfile() , fopen() , and popen() .