?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
switch($b)
{
case 2:
print "hello";
break;
case 1:
print "hi";
break;
}
?>
<?php
switch($b)
{
case 2:
print "hello";
break;
case 1:
print "hi";
break;
}
?>
Answer & Solution
Correct Answer:
Option
C
If that case does not exist then it searches for default and on not finding it does nothing.
Join the Discussion
Login to post a comment or share your explanation.
Login