Vidyalelo
PHP · Q8

Basic PHP

Programming · PHP · question 8

Q8

What will be the output of the following php code?

A.
3
B.
1+2
Answer
C.
1.+.2
D.
Error

Answer: Option B

Solution

Answer: Option B
Solution:
.(dot) is used to combine two parts of the statement. Example ( $num . “Hello World” ) will output 1Hello World.