A
Q. What will be the output of the following PHP code ?
Code:
<?php
$opt = "1";
switch($opt)
{
case 1:
break;
print "First Statement";
case 2:
print "Second Statement";
break;
default:
print "Third Statement";
}
?>
$opt = "1";
switch($opt)
{
case 1:
break;
print "First Statement";
case 2:
print "Second Statement";
break;
default:
print "Third Statement";
}
?>
- Correct Answer - Option(D)
- Views: 22
- Filed under category PHP
- Hashtags:
Discusssion
Login to discuss.