///reply.php
if($pass==$mypass)
{
$i=0;
$filename="gb.txt";
$myfile=fopen($filename,"r");
while(!feof($myfile))
{ $i++;
$get1=fgets($myfile,4096);
if($i==$id)
{
$get1=chop($get1)£»
$get1.='|'.$reply.'\n'£»
}
$get=$get.$get1;
}
fclose($myfile);
$myfile=fopen($filename,"w");
fputs($myfile,$get);
fclose($myfile);
}
in the file gb.txt
the origin is
1111111
2222222
333333
44444444
after I run this php
(id=2)(reply=test)
I expect this will be appear in the bg.txt file
111111111
222222222|test
3333333333
4444444444
but the result is
111111111
222222222|test 3333333333
4444444444
just a space between test and 3333333
if this
$get1=chop($get1)£»
were not be writen the reply "test"
will start in a new line that is not my pirpose.
how can I make 33333333 in a new line
why ."\n"can not do the job!!!
thanks !!