Examveda
Examveda

What will be the output of the following PHP code ?
<?php
while()
{
    print "hi";
}
?>

A. infinite loop

B. hi

C. no output

D. error

Answer: Option D

Solution(By Examveda Team)

The while loop cannot be defined without a condition.

This Question Belongs to PHP >> Control Structures(Loop In PHP)

Join The Discussion

Related Questions on Control Structures(Loop in PHP)