?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
$i = "";
while ($i)
{
print "hi";
}
while($i < 8)
$i++;
print "hello";
?>
<?php
$i = "";
while ($i)
{
print "hi";
}
while($i < 8)
$i++;
print "hello";
?>
Answer & Solution
Correct Answer:
Option
D
The while loop ends only when a } is encountered.
Join the Discussion
Login to post a comment or share your explanation.
Login