Reading a file in PHP Posted on 2012-01-16 [Monday] by Jay Jay The file function parses a text file into an array, and the file_get_contents function returns a text file as a string.