Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.

# Thread: How do you create a list of numbers?

1. ## How do you create a list of numbers?

I need to create some lists of numbers.

e.g. the numbers 1-10,000 in 50s (1, 51, 101, 151 etc.)

the numbers 10-20,000 in tens (10, 20, 30, 40 etc.)

How can you do that? All I can find is ways to make sequential numbers (1, 2, 3, 4 etc.)

Help!

Thanks
Mike

2. It depends on what language you're using, but a "for" loop is the way to do it, and should be basically the same as whatever way you found to do it for sequential numbers.

C:
for (i=0 [this is the starting value];
i<10000 [this is the "until it gets to this"];
i+=10 [this is the "add this much after each loop"]
)

3. Sorry, should've been clearer. Any PHP versions?

4. Originally Posted by instaunt
Sorry, should've been clearer. Any PHP versions?
Just write a for loop in php. Variables just start with a \$ symbol. Basic stuff, you need to learn it.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•