What will be the output of the following PHP code ?
<?php
for ($count = 1; $count != 20;$count++)
{
print $count;
$count++;
}
?>
<?php
for ($count = 1; $count != 20;$count++)
{
print $count;
$count++;
}
?>
A. Infinite
B. 123…….20
C. 1357…19
D. 13579…21
Answer: Option A
Solution(By Examveda Team)
Condition always fails as count takes only odd numbers.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