Hello all,
Newbie here. Just started learning PHP and Struggling to solve this task.
Task: Iterate a variable from 1 to 10 and print all numbers except 4 and 6 and exit loop at 8.
<?php
function iterateVariables () {
for ($x = 1; $x <= 10; $x++) {
echo "The number is: $x <br>";
}
}
iterateVariables ()
?>