How to fix auto newline PHP
<pre><code>$LINE = $User.",".$data[$k][10];
echo $LINE;
$str=implode("",file('Friends.php'));

$fp=fopen('Friends.php','w+');

$str=str_replace($User,$LINE,$str);

fwrite($fp,$str,strlen($str));
</code></pre>

<p>OK, this code is a bit weird but it just appends to a string of my choice. Out should come:</p>

<pre><code>H4cKL0rD,9,1,2,3,4
</code></pre>

<p>but when it writes it it outputs into the file as </p>

<pre><code>H4cKL0rD,9
,1,2,3,4
</code></pre>

<p>it adds a <code>\n</code></p>
