English

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

Advertisements

Question

What will be the output of the following PHP code?

<?php
$a = “ ”;
if ($a)
print “all”;
else
print “some”;
?>

Options

  • all

  • some

  • error

  • no output

MCQ
Advertisements

Solution

error

shaalaa.com
Control structures in PHP
  Is there an error in this question or solution?
Chapter 6: PHP Conditional Statements - Evaluation - PART – I [Page 110]
Advertisements
Share
Notifications



      Forgot password?
Use app×