0

How we get data from a text file in php

10th Jul 2020, 1:52 PM
Dulranga Dhawanitha
Dulranga Dhawanitha - avatar
2 Answers
0
There are more often used functions for text files: 1. file_get_contents('path_to_text_file') returns entire file into the string. It is the same as combination of 3 functions: fopen(), fread(), fclose() 2. file('path_to_text_file') returns an array of strings.
10th Jul 2020, 10:09 PM
Konstantin Rybakov
Konstantin Rybakov - avatar
10th Jul 2020, 1:57 PM
Arnesh
Arnesh - avatar