\[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\]OK, this code is a bit weird but it just appends to a string of my choice. Out should come:\[code\]H4cKL0rD,9,1,2,3,4\[/code\]but when it writes it it outputs into the file as \[code\]H4cKL0rD,9,1,2,3,4\[/code\]it adds a \[code\]\n\[/code\]