Question
What will be the output of the following PHP code ?
<?php
$a = "1";
switch($a)
{
case 1:
break;
print "hi";
case 2:
print "hello";
break;
default:
print "hi1";
}
?>
<?php
$a = "1";
switch($a)
{
case 1:
break;
print "hi";
case 2:
print "hello";
break;
default:
print "hi1";
}
?>
Answer: Option B
Submit Your Solution Below and Earn Points !
Submit Your Solution Below and Earn Points !
Submit Solution