&$val){ $val.='.'; if($k!=0 and $k%$abz==0){ $val.="\r\n"; } } $cont=implode('', $en); $cont=str_replace('..','.',$cont); $cont=str_replace(' ',' ',$cont); $cont=str_replace('. .','.',$cont); $cont=str_replace('. ','.',$cont); $cont=str_replace(' .','.',$cont); $cont=str_replace('.','. ',$cont); file_put_contents('res.txt',$cont); file_put_contents('res2.txt',str_replace("\r\n",'',$cont)); $qq=explode("\r\n", $cont); $num=1; for($nmn=0;$nmn