What will be the output of the following PHP code ?
<?php
do
{
print "hi";
}
while(0);
print "hello";
?>
<?php
do
{
print "hi";
}
while(0);
print "hello";
?>
A. infinite loop
B. hihello
C. hello
D. error
Answer: Option B
Solution(By Examveda Team)
The do while loop executes atleast once as the condition is in the while loop.Related Questions on Control Structures(Loop in PHP)
A. how are u
B. hi
C. error
D. no output
A. hi
B. no output
C. error
D. how are u
A. how are uhello
B. hihello
C. hi
D. no output
A. true
B. false
C. error
D. no output
Join The Discussion