Jump to content

[SOLVED] Need help printing series numbers between $x and $y


rcorlew

Recommended Posts

I am trying to simply print a series of numbers that will generally be from 1 to less than 100. I have tried and tried an all can seem to print is about a million 1's. Here is what I am starting with and maybe someone could help:

 

<?php
$x = 1;
$y = 20;
for($i = $x; $i <=  $y; $x++) {
print "$i\n";
}
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.