Hi,
I have a snippet code below
<?php
//get value of $new from other codes
//$new will provide outputs of a new number every time it is executed
echo "$new<br/>";
$strFile = "1.txt";
file_put_contents($strFile, $new);
The idea is that I want to put a new line of number in 1.txt every time this code is executed.
So basically, I wanted to have ("number" below will be some integer number ) :
"number1"
"number1,number2"
"number1,number2,number3"
example :
1
1,7
1,7,10
and so on..
inside the file of 1.txt.
How can I fix the code above so that it will provide me with the output that I wanted?
I am sorry for my bad English, but I am thank you for the suggestion