Examveda
Examveda

What will be the output of the following PHP code ?
<?php
for ($x =1; $x < 10;++$x)
{
    print "*t";
}
?>

A. **********

B. *********

C. ***********

D. infinite loop

Answer: Option B

Solution(By Examveda Team)

Loop runs from 1 to 9 i.e 9 times.

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

Join The Discussion

Related Questions on Control Structures(Loop in PHP)