ExamVeda
Login
Home
Control Structures(Loop in PHP)
?

What will be the output of the following PHP code?
<?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.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.