Hi
I'm having this strange problem when I try to update my text. The code is below
///// There is alot more code but this seems to be the section
that is causing the errors ////////////////
///// Change The Old String To The New Updated String
$NewRow = str_replace( $OriginalString, $NewLinkString , $EachRow);
$GetRowNumber = $i;
$EachRow = $NewRow;
echo $EachRow ;
echo $Count;
$fp = fopen( $file , "w" );
for($i=0; $i<$Count; $i++)
{
fwrite($fp, $EachRow);
}
fclose( $fp );
There are two problems I am basically getting
I Only want it to update row 2 in text file (See Below) . When I try it, it changes every row in the text file so they match.
If I change certain sections it reads the text file displays the echo statements and then deletes all the information in the text file.
Any ideas how to change these problems
Thanks
Oliver
Jane😛lane-128😛lane-128
Dave😛lane-128😛lane-128
Kate😛lane-128😛lane-128
Jake😛lane-128😛lane-128