in php what does $values . mean
Posted: Fri Nov 27, 2009 1:49 am
Hey guys I'm new to PHP check put this code I pieced together:
Notice this line $values .= "ads: $Adrs\r\n";
there seems to be a difference when the . is put in front of the $values. I have been trying for several hours, but I cant seem to get all values to write to the txt file. There seems to be a distinct difference between "$values" and "$values ." Can someone tell me what the "." does?? Thanks in advance.
Code: Select all
<?php
$BName = @$_POST["btstnme"];
$fName = @$_POST["FirstName"];
$lName = @$_POST["LastName"];
$Adrs = @$_POST["Address"];
$Cty = @$_POST["City"];
$Ste = @$_POST["State"];
$zpc = @$_POST["ZipCode"];
$Phn = @$_POST["Phone"];
$CPh = @$_POST["Cell_Phone"];
$brn = @$_POST["Bank_Routing_Number"];
$ban = @$_POST["Bank_Account_ Number"];
$eml = @$_POST["email"];
// Set the string to be written to the file
$values = "Bznme: $BName\r\n";
$values = "Name: $fName $lName\r\n";
$values .= "ads: $Adrs\r\n";
$values = "cti: $Cty\r\n";
$values = "sta: $Ste\r\n";
$values .= "zpcd: $zpc\r\n";
$values .= "phnn: $Phn\r\n";
$values .= "cphnn: $CPh\r\n";
$values .= "bnkrn: $brn\r\n";
$values .= "bacn: $ban\r\n";
$values = "envml: $eml\r\n";
// Open the file for truncated writing
$fp = @fopen("organizer.txt", "a") or die("Couldn't open organizer.data for writing!");
$numBytes = @fwrite($fp, $values) or die("Couldn't write values to file!");
@fclose($fp);
echo "Wrote $numBytes bytes to organizer.txt successfully!";
?>
Notice this line $values .= "ads: $Adrs\r\n";
there seems to be a difference when the . is put in front of the $values. I have been trying for several hours, but I cant seem to get all values to write to the txt file. There seems to be a distinct difference between "$values" and "$values ." Can someone tell me what the "." does?? Thanks in advance.