[web] Determining if an ID is within a certain range

Started by
1 comment, last by fooman_69 14 years, 9 months ago
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!
Advertisement
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)
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
I'm using PHP.

Thanks for the reply!

This topic is closed to new replies.

Advertisement