I am trying to add a string to the end of eachline. So far this works. However I dont want the string to be added to the end of the first line. How can I do this?

So far i have got:

```
<?php

$EOLString="string \n";
$fileName = "file.txt";
$baseFile = fopen($fileName, "r");
$newFile="";
while(!feof($baseFile)) {
    $newFile.= str_replace(PHP_EOL, $EOLString, fgets($baseFile));
}
fclose($baseFile);
file_put_contents("newfile.txt", $newFile);

$bingName = "newfile.txt";
$bingFile = fopen($bingName, "a+");
fwrite($bingFile,$EOLString);
fclose($bingFile);

?>

```

I have also tried to loop it by doing this:

```
<?php

$EOLString="string \n";
$fileName = "file.txt";
$baseFile = fopen($fileName, "r");
$newFile="";
$x = 0;
while(!feof($baseFile)) {
    if ($x > 0) {
        $newFile.= str_replace(PHP_EOL, $EOLString, fgets($baseFile));
    }
    $x++;
}
fclose($baseFile);
file_put_contents("newfile.txt", $newFile);

$bingName = "newfile.txt";
$bingFile = fopen($bingName, "a+");
fwrite($bingFile,$EOLString);
fclose($bingFile);

?>

```

So the end result would look like:

firstonestring
secondonestring
thirdonestring

and so on.

I hope you can help me!

Ben :)