[PHP] Comining variables into a single string

2001-09-16 Thread Salty Marine


Greetings to All:

I'm inexperienced, although enthusiastic about using PHP.  I want to write
data more effectively to a file.

This doesn't work:  fputs($frank, Testing  $whatever  more testing
\n\n\n);
Right now, all I know is using three separate fputs statements.  I'd like to
use just one.

This works:
$frank = fopen(VisitorInfo.txt,r+);

fputs($frank, date(h:i A));

fputs($frank, \n);

fputs($frank, date(F d, Y));

fputs($frank, \nIP Address: );

fputs($frank, $ipaddr);

fputs($frank, \nHost: );

fputs($frank, $what);

fputs($frank, \n\n\n);

fclose ($frank);


Regards,
Salty



RE: [PHP] Comining variables into a single string

2001-09-16 Thread Luboslav Gabal ml.


 Greetings to All:

 I'm inexperienced, although enthusiastic about using PHP.  I want to write
 data more effectively to a file.

 This doesn't work:  fputs($frank, Testing  $whatever  more testing
 \n\n\n);
 Right now, all I know is using three separate fputs statements.  I'd like
to
 use just one.

fputs($frank, Testing .$whatever. more testing\n\n\n);

see http://www.php.net/manual/en/language.operators.string.php

Luboslav Gabal


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]