what is the output of below script? <?php
Top Questions
<?php
$x = 3;
switch ($x) {
case 2: echo 'line 1'; break;
case 3:
case 4: echo 'line 2'; break;
default: echo 'line 3';
}
?>a. echo 'line 3';
b. echo 'line 2';
c. Error
d. None of the above
Ans: b (Answer is line2)
www.w3answers.com
Post new comment