?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
$a = 10;
echo ++$a;
echo $a++;
echo $a;
echo ++$a;
?>
<?php
$a = 10;
echo ++$a;
echo $a++;
echo $a;
echo ++$a;
?>
Answer & Solution
Correct Answer:
Option
A
++$a increments a and then prints it,$a++ prints and then increments.
Join the Discussion
Login to post a comment or share your explanation.
Login