Q. What will be the output of the following PHP code?
Code:<?php
$counter = 1;
while ($counter++ <= 5)
{
echo $counter, ",";
$counter++;
}
?>
β
Correct Answer: (C)
2,4,6
<?php
$counter = 1;
while ($counter++ <= 5)
{
echo $counter, ",";
$counter++;
}
?>
You must be Logged in to update hint/solution