Re: [PHP] CRLF in file

2003-01-26 Thread Jason Wong
On Sunday 26 January 2003 22:13, Malcolm Brownell wrote:
 Hello,

   I'm having trouble with /r/n when I try to write to a file.

It's \r\n that you want.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
If wishes were horses, then beggars would be thieves.
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] CRLF in file

2003-01-26 Thread Malcolm Brownell

awww geeze !   Thank you sir.
Again I embarass myself and slink away


On Mon, 27 Jan 2003 00:35:01 +0800, [EMAIL PROTECTED] (Jason Wong) wrote:
 On Sunday 26 January 2003 22:13, Malcolm Brownell wrote:
  Hello,
 
I'm having trouble with /r/n when I try to write to a file.
 
 It's \r\n that you want.
 
 -- 
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 
 /*
 If wishes were horses, then beggars would be thieves.
 */
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] CRLF in file

2003-01-26 Thread Malcolm Brownell
Thank you Jason,
If you'll bear with me for one more question  --
The /\ fix did what I wanted but now the word Array
appears before the first var  -- the text file looks like this -

Array$hostname  = hostname
$SQL_USER  = username
$SQL_PWD  = dbpass

I know this is php telling me the data is an array but can I supress this somehow so 
all I'll 
print is the  keys and vals?

thanks

malcolm

On Mon, 27 Jan 2003 00:35:01 +0800, [EMAIL PROTECTED] (Jason Wong) wrote:
 On Sunday 26 January 2003 22:13, Malcolm Brownell wrote:
  Hello,
 
I'm having trouble with /r/n when I try to write to a file.
 
 It's \r\n that you want.
 
 -- 
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 
 /*
 If wishes were horses, then beggars would be thieves.
 */
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] CRLF in file

2003-01-26 Thread Jason Wong
On Monday 27 January 2003 01:27, Malcolm Brownell wrote:
 Thank you Jason,
 If you'll bear with me for one more question  --
 The /\ fix did what I wanted but now the word Array
 appears before the first var  -- the text file looks like this -

 Array$hostname  = hostname
 $SQL_USER  = username
 $SQL_PWD  = dbpass

 I know this is php telling me the data is an array but can I supress this
 somehow so all I'll print is the  keys and vals?

 fputs($fp,$ch);

Remove the above line.

 foreach($ch as $key = $val) {
 fputs($fp,$$key  = $val/r/n);
 }
 fclose ($fp);

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
I just want to be a good engineer.
-- Steve Wozniak, co-founder of Apple Computer, concluding his keynote speech 
   at the 1988 AppleFest
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php