When I write to text file , all data printed on first line , although I used PHP_EOL , I want to print it line by line.
$file_Name = './textFilesData/Accounts_Deafult_Data.txt';
$current = file_get_contents($file_Name);
$c = 0;
while ( $c < 5 )
{
$current = 'Rafat';
$current = $current.PHP_EOL;
$c++;
}
file_put_contents($file_Name, $current);
You can use:
$current = "$current1\n";
Use this,
Adding
\r\n
should work