about 9 years ago
Hi Reader's,
Welcome to FindNerd, today we are going to discuss how to reads a file into an array ?
If you want to read a file into an array then, you should use file() function.This function reads a file into an array.
syntax of file() function
So there are 3 main parameter of above syntax
1-path is a required parameter.
2-include_path and context both are optional parameter
you can see below example:
The output of the code above will be: Array ( [0] => Hi all welcome to findnerd )
0 Comment(s)