PHP - Loops
What will be the output of this PHP code?
$sum = 0;
for ($i = 1; $i <= 3; $i++) {
$sum += $i;
}
echo $sum;$sum = 0;
for ($i = 1; $i <= 3; $i++) {
$sum += $i;
}
echo $sum;15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions