I am trying to add a new line to a text file in php
I current have the following line of code
file_put_contents($_SESSION["name"].'.txt', $_POST["item"]."\n", FILE_APPEND);
The goal of this line is to add a new file to a text file associated with a user. It works fine. However I need the text to display on separate lines
I want the text file to look like this
item1
item2
item3
etc..
right now it looks like item1item2item3etc...
how do I get the new line to show up in the text file?