tastro Posted October 28, 2009 Share Posted October 28, 2009 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 Link to comment https://forums.phpfreaks.com/topic/179338-how-to-put-the-0-100-numbers-into-1txt-and-100-200-into-2txt/ Share on other sites More sharing options...
dgoosens Posted October 28, 2009 Share Posted October 28, 2009 just add an if statement within your script that checks if the int is dividable by 100 and if so, change the file you are writing to... Link to comment https://forums.phpfreaks.com/topic/179338-how-to-put-the-0-100-numbers-into-1txt-and-100-200-into-2txt/#findComment-946215 Share on other sites More sharing options...
tastro Posted October 28, 2009 Author Share Posted October 28, 2009 lol i'm such an idiot... i knew it, i'm just to tired to think. thank you m8 helped me a lot just the idea. :> if($number<100){fwrite($openedfile1,$number);}else{fwrite($openedfile2,$number);} or something like this... tnx... i can do the rest alone. Link to comment https://forums.phpfreaks.com/topic/179338-how-to-put-the-0-100-numbers-into-1txt-and-100-200-into-2txt/#findComment-946218 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.