?
What will be the output of the following PHP code?
What will be the output of the following PHP code?
<?php
$x;
if ($x)
print "hi" ;
else
print "how are u";
?>
<?php
$x;
if ($x)
print "hi" ;
else
print "how are u";
?>
Answer & Solution
Correct Answer:
Option
A
Uninitialized x is set to 0, thus if condition fails.
Join the Discussion
Login to post a comment or share your explanation.
Login