ExamCompetition Forum Question Papers Ask A Question Mock Test Learn & Earn Sign Up Login Menu



0 vote

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

Asked on by | Votes 0 | Views: 125 | Tags: computer science     | php     | basic php     | Add Bounty

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


Share on Facebook      Share on Whatsapp       Share on Twitter




1 answers

1 vote
Answered by on | Votes 1 |

 1+2



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

Join Telegram Group




Answer This Question

Name:
Email:
Answer :
Sum of (1+2)
Submit: