Examveda
Examveda

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

A. 0

B. infinite loop

C. no output

D. error

Answer: Option D

Solution(By Examveda Team)

Wrong syntax for for loop.

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

Join The Discussion

Related Questions on Control Structures(Loop in PHP)