• 0

Need a JAVA loop statement quick


Question

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

  • 0

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

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.