I have a file called instructions.txt that is filled with the information that the user writes in a textfield, by clicking on the save button.
when creating a new line every time I click through the fwrite code line ($ file, $ content.PHP_EOL); at the end of each line a blank space is created.
I have been recommended to use trim but when doing this the lines that I keep are like this:
How can I save line by line without creating a blank space at the end?