[web] Determining if an ID is within a certain range
I have a page with a group of 7 thumbnails at the top.
I'm not sure how to determine which 7 thumbnails to display.
If the page ID is between 1 and 7, the first 7 thumbnails should display... if the ID is between 8 and 14, the next 7 will display.
I'm not sure how to program this dynamically I guess.
Any help is greatly appreciated!
Quote:Original post by fooman_69
I have a page with a group of 7 thumbnails at the top.
I'm not sure how to determine which 7 thumbnails to display.
If the page ID is between 1 and 7, the first 7 thumbnails should display... if the ID is between 8 and 14, the next 7 will display.
I'm not sure how to program this dynamically I guess.
Any help is greatly appreciated!
numberToStartAt = floor(ID/7)+1; (the floor function may be inside a namespace in some languages, if you say what language you're using you can get more accurate help)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement