ckennerdale
Programmer
I am trying to write an array in to string which is then written to a text file
I am using implode() on the array and using fputs this string is written to my text file-
so far so good
However in my text file there is a line break after each entry,which i need to get rid of
(This is not /r or /n but a pysicalline break)
As this file is be readmy another application my string needsto written all on 1line ofthe text file-
$cat1text is the array
$cat1text = implode(",",$cat1text);
$fp = fopen("cat1text.txt", "w"
fputs($fp,$cat1text);
fclose($fp); Caspar Kennerdale
Senior Media Developer
I am using implode() on the array and using fputs this string is written to my text file-
so far so good
However in my text file there is a line break after each entry,which i need to get rid of
(This is not /r or /n but a pysicalline break)
As this file is be readmy another application my string needsto written all on 1line ofthe text file-
$cat1text is the array
$cat1text = implode(",",$cat1text);
$fp = fopen("cat1text.txt", "w"
fputs($fp,$cat1text);
fclose($fp); Caspar Kennerdale
Senior Media Developer