how to put the 0-100 numbers into 1.txt and 100-200 into 2.txt and so on 200-300 into file 3.txt ? in PHP of course. i don't know if i'm really that dumb or is it the 36 hours of no sleep that i can't figure it out. :S
ok, i figured it out. just a little if statement if the number is bigger then 100 then add to 1.txt else 2.txt damn... can't belive i couldn't figure out that. just too tired i think. :S
thats one way to do it but what happens when you get into 600 - 700 and so forth, you are going to have to keep adding else if, else if, etc... which is not a scalable solution. look into modular(%) operand. for example $loop = 1; $fileIter = 1; while($loop < 1000){ if(($loop%100) == 0) ++$fileIter; put data into $fileIter.'txt'; ++$loop; } sorry for the pseudo code, but i think you can catch my drift.