Monday, February 4, 2019

What does a . (dot) do in PHP?



What does the following command do in PHP?



. $string   // ($string is something which i declared in the program)

Answer



On its own, that does nothing at all (it's not valid syntax). However, if you have something like this:





$string1 = "Hello ";
$string2 = "world!";
$string = $string1 . $string2;

echo $string;

?>



You will see Hello world!. The . is the string concatenation operator.


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...