6.
What will be the output of the following PHP code ?
<?php
$a = 1;
if (echo $a)
    print "True";
else
    print "False"; 
?>

7.
What will be the output of the following PHP code ?
<?php
$a = 1;
if (print $a)
    print "True";
else
    print "False"; 
?>

8.
What will be the output of the following PHP code ?
<?php
$a = 10;
if (1) 
    print "all";
else 
    print "some"
else 
    print "none";
?>

9.
What will be the output of the following PHP code ?
<?php
$a = 10;
if (0) 
    print "all";
 if 
 else 
     print "some"
?>

10.
What will be the output of the following PHP code ?
<?php
$a = "";
if ($a) 
    print "all";
if 
else 
    print "some";
?>

Read More Section(Control Structures(Loop in PHP))

Each Section contains maximum 70 questions. To get more questions visit other sections.