Examveda
Examveda

What will be the output of the following PHP code ?
<?php
for ($i = 0; 0; $i++) 
{
    print"i";
}
?>

A. infinite loop

B. 0

C. no output

D. error

Answer: Option C

Solution(By Examveda Team)

The condition of the loop is always false 0.

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

Join The Discussion

Related Questions on Control Structures(Loop in PHP)