file_put_contents(file, data._) is a function that will write the information you are giving to the file. The variable, $file, needs to set a value. In this case, it will be "file.csv". The function can also run several parameters.
CSV means Comma Separated Values and it is primarily used by Excel. An individual or a company may want to use this type of file in order to store data. It can also be easily opened with popular spreadsheet programs such as Excel, as mentioned earlier.
The link to my working code is here.