61
What will be the output of the following PHP code ?
<?php
for ($x = 0; $x <= 10; print ++$x)
{
print ++$x;
}
?> Answer & Solution
Answer: Option
A
Solution:
The value of x is incremented and printed twice before checking,thus last loop it prints 11 and 12.