Comining variables into a single string

From: Date: Sun, 16 Sep 2001 18:50:39 +0000
Subject: Comining variables into a single string
Groups: php.general 
Request: Send a blank email to php-general+get-67516@lists.php.net to get a copy of this message
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

« previous php.general (#67516) next »