I am trying to rewrite a file with the contexts of an array but I want each item in the array to be on separate line. Is this possible to do?
I currently have the following:
file_put_contents('file.txt',$tempArray);
The array has the following contents:
$tempArray = ["xyz","zyx", "123"]
and I want the file to look like this in the end:
xyz
zyx
123
but I am getting it all on one line currently