Question:Which language construct can best represent the following series of if conditionals?
<?php
if($a == 'a') {
  somefunction();
} else if ($a == 'b') {
  anotherfunction();
} else if ($a == 'c') {
  dosomething();
} else {
  donothing();
}
?>
 

A A switch statement without a default case 

B A recursive function call 

C A while statement 

D It is the only representation of this logic 

E A switch statement using a default case 

+ Answer
+ Explanation
+ Report
Total Preview: 659

Copyright © 2024. Powered by Intellect Software Ltd