Scripter Posted May 3, 2003 Share Posted May 3, 2003 well i was wondering if someone could give me an example of a java or php loop statement lets say im adding screen shots to my site. and i uploaded the images and they are called screen1.jpg-screen50.jpg i dont want to just copy and paste and change the number all the time. was wondering if it was possiable in php or JAVA to lets say enter the start number and end number and it generates u the name from screen1.jpg to screen50.jpg kinda like a for i, dont know how those go in php or JAVA though for i = input1 to input2 num = num + 1 print screen[num].jpg next i something like that or something :D Link to comment Share on other sites More sharing options...
0 deadearth Posted May 3, 2003 Share Posted May 3, 2003 for( int i = startNum ; i <= endNum; i++){ Code Goes Here } Hope That helps Edit: That's a java version Link to comment Share on other sites More sharing options...
0 Scripter Posted May 3, 2003 Author Share Posted May 3, 2003 thanks a lot deadearth :D Link to comment Share on other sites More sharing options...
Question
Scripter
well i was wondering if someone could give me an example of a java or php loop statement
lets say im adding screen shots to my site. and i uploaded the images and they are called screen1.jpg-screen50.jpg
i dont want to just copy and paste and change the number all the time. was wondering if it was possiable in php or JAVA
to lets say enter the start number and end number and it generates u the name from screen1.jpg to screen50.jpg
kinda like a for i, dont know how those go in php or JAVA though
for i = input1 to input2
num = num + 1
print screen[num].jpg
next i
something like that or something :D
Link to comment
Share on other sites
2 answers to this question
Recommended Posts