I am very new to PHP and I just cant get this to work correctly. I have tried serval ways and looked through this site for guidance. I am at a loss and I am hoping some one can help me.
-I wrote serval lines of code (for loops) which print a series of number. The problem is I want each loop to display on it own line.
<?php
for ($i=4; $i <= 10; $i++) {
echo "$i ";
}
for ($x=6; $x > 0; $x--) {
echo "$x ";
}
for ($y=2; $y <= 16; $y+=2) {
echo "$y ";
}
for ($num=19; $num >= 5; $num-=2) {
echo "$num ";
}
?>
I have tried adding a break; after the echo statement but it just stops the loop at the first value.
Thanks