Instead of repeating the same code over and over 15 times:
I would rather do something like this:
But how do I loop through the variable GetNewImages.photoX 15 times?
GetNewImages.photo1
GetNewImages.photo2
GetNewImages.photo3
etc.
Code:
<cfif GetNewImages.photo1 NEQ "">
- Lots of code to process the image on to my server -
</cfif>
<cfif GetNewImages.photo3 NEQ "">
- Lots of code to process the image on to my server -
</cfif>
<cfif GetNewImages.photo4 NEQ "">
- Lots of code to process the image on to my server -
</cfif>
...repeat until 15
I would rather do something like this:
Code:
<cfloop
index="image"
from="1"
to="15"
step="1">
<cfif GetNewImages.photoX NEQ "">
- Lots of code to process the image on to my server -
</cfif>
</cfloop>
But how do I loop through the variable GetNewImages.photoX 15 times?
GetNewImages.photo1
GetNewImages.photo2
GetNewImages.photo3
etc.