implode help

From: Date: Mon, 05 Nov 2001 12:17:38 +0000
Subject: implode help
Groups: php.general 
Request: Send a blank email to php-general+get-73471@lists.php.net to get a copy of this message
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 1 line of the text file- code- $cat1text is the array $cat1text = implode(",",$cat1text); $fp = fopen("cat1text.txt", "w"); fputs($fp,$cat1text); fclose($fp); output- item1 ,item2 ,item3 ,item4 this is what I want item1,item2,item3 Any Ideas? Thanks In Advance

« previous php.general (#73471) next »