setQueueTable("queue"); $queue_a->setTimeout(1); $queue_a->getInQueue(); if ($queue_a->waitInLine() == true) { // When the user gets to the first in line echo "You have got to the first position in the queue.
"; $qtime = $queue_a->queueTime(); echo "You were in the queue for {$qtime} seconds.

"; } else { // If some is wrong, user times-out echo "You have been kick-out of the queue!"; } $queue_a->getOutOfQueue(); //======================================================================================== // This is to show that you have have more than 1 queue on the same page $queue_b = new Queue(2); $queue_b->getInQueue(); $q_return = $queue_a->waitInLine(); if ($q_return == true) { // Do some function } $queue_b->getOutOfQueue(); ?>