Order of rooms


#1

Hi,

Ive got one trouble. Ive got order of rooms(order by id), but I`m
choosing available one, after that I would like to send the room,
which was taken on the last place. Something like this I have:

1.room(id = 1) 2. room (id = 2) 3. room (id = 3) I will take first
room, but after that I would like to have:
2.room (id = 2) 3.room (id = 2) 1.room (id = 3), it doesn`t have to be
id it might be rank or something like that.

I would appreciate if you could help.

Thank you Janka


#2

If you stick your rooms into an array, just pick out whichever room is
selected, and push that room back onto the tail of the array.


#3

Thank you,

I will try it.