Question:Which values should be assigned to the variables $a, $b and $c in order for the following script to display the string Hello, World!?
<?php
$string = "Hello, World!";
$a = ?;
$b = ?;
$c = ?;
if($a) {
  if($b && !$c) {
    echo "Goodbye Cruel World!";
  } else if(!$b && !$c) {
    echo "Nothing here";
  }
} else {
   if(!$b){
     if(!$a && (!$b && $c)) {
        echo "Hello, World!";
     } else {
       echo "Goodbye World!";
     }
  } else {
    echo "Not quite.";
  }
}
?>
 

A False, True, False 

B True, True, False 

C False, True, True 

D False, False, True 

E True, True, True 

+ Answer
+ Explanation
+ Report
Total Preview: 736

Copyright © 2024. Powered by Intellect Software Ltd