Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following PHP code?
<?php
$num = 1;
$num1 = 2;
print $num . “+”. $num1;
?>

What will be the output of the following PHP code?
<?php
$num = 1;
$num1 = 2;
print $num . “+”. $num1;
?>
a) 3
b) 1+2
c) 1.+.2
d) Error

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

Join The Discussion