That is correct in the first instance where Room1 has order 1 etc, but I will explain further.
User form lists room names and option to change listing order.
Form gets submitted and new values for each are passed as two arrays.
Array1 = $room
Array2 = $order
The order that they are now in the array will be the order I want them, which could be:
$room $order
room2 3
room1 2
room3 1
What I would like to do is say,
"Get the last item in each array and do this....
update rooms (room_name, list_order) VALUES ($room, $order)
for each of the variables in the array"
But I don't exactly want an ordered list, but I want the values in the array to be give to me in the same order from both arrays...
I have though that foreach would do this, but it can't do it concurrently can it ? as they would have to be nested.. but would this be possible ?? (brain may have just kicked in...)
foreach ($room as $roomname)
{
$listorder = array_pop($order);
insert SQL statement here to update with $roomname and $listorder;
}