What will be the output of the following PHP code ?
<?php
$a = "1";
switch ($a)
{
case 1:
print "hi";
case 2:
print "hello";
default:
print "hi1";
}
?>
<?php
$a = "1";
switch ($a)
{
case 1:
print "hi";
case 2:
print "hello";
default:
print "hi1";
}
?>A. hihellohi1
B. hi
C. hihi1
D. hi1
Answer: Option A

Join The Discussion