Code Question

What the the purpose or meaning of:

".$spswd."

versus

"$spswd"

?

Arthur

Arthur,

I think what you are looking at is just a fragment of a line of code.

The period symbol means to concatenate the items on either side into a single string.

“abc” . “def” will become “abcdef”.

When using a variable, it can sometimes look a bit weird, for instance:

$data = “cd”;
echo “ab” . $data . “ef”;
Which again will output “abcdef”

it looks even worse if we leave out the spaces (I put them in strictly for readability):
echo “ab”.$data.“ef”;

$name = “Dave”;
echo “My name is “.$name.” and thank you for asking.”;

Dave