?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
$x = 0;
if ($x++)
print "hi";
else
print "how are u";
?>
<?php
$x = 0;
if ($x++)
print "hi";
else
print "how are u";
?>
Answer & Solution
Correct Answer:
Option
D
x is incremented after if which evaluates to false.
Join the Discussion
Login to post a comment or share your explanation.
Login