I\'m trying to write username and password to a new line in a txt file. The output should be something like this in the txt file. I know this is not very secure but its just
How about you store it like this? Maybe in username:password format, so
sebastion:password123 anotheruser:password321
Then you can use list($username,$password) = explode(':',file_get_contents('users.txt')); to parse the data on your end.
list($username,$password) = explode(':',file_get_contents('users.txt'));