Thread
:
Array help
View Single Post
#
10
08-29-2011, 11:39 PM
Crow
ǝɔɐɹq ʎןɹnɔ
Join Date: Dec 2006
Location: Germany
Posts: 5,153
You could use the modulo operator for this one.
PHP Code:
this
.
selectedid
= (
this
.
selectedid
+
1
) %
this
.
rights
.
size
();
Should also work for "scrolling" in the other direction. No need for a loop either. Just check the key code and do that.
Crow
View Public Profile
View GraalOnline Profile
Find all posts by Crow