0) { foreach($msgbuffer as $k=>$v) { if(count($v) > 0) { send_msg($v[0]); unset($msgbuffer[$k][$v][0]); sort($msgbuffer[$k][$v]); } else { unset($msgbuffer[$k]); } } } ?> ^ as a message buffer, so that messages can be spread out amonst ppl even if someone has asked for a lot of info?