PHP MCQ PHP Basic MCQ Question #2353
Single Choice Not Set

QWhat will be the output of the following php code
< ?php 
$num  = 1;
$num1 = 2;
print $num . "+". $num1 ;
?>

ID: #2353 PHP Basic MCQ 2,415 views
Question Info
#2353Q ID
Not SetDifficulty
PHP Basic MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

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

Explanation

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

Share This Question

Challenge a friend or share with your study group.