41
What will be the output of the following PHP code ?
<?php
switch($b)
{
case 2:
print "hello";
break;
case 1:
print "hi";
break;
}
?> Answer & Solution
Answer: Option
C
Solution:
If that case does not exist then it searches for default and on not finding it does nothing.