The Zend Developer Zone has posted part six of their tutorial creating an Ajax chat application with the help of the Zend Framework. This part of the series focuses on updating the user list for the current participants in the conversation.
Updating the user list should occur whenever the user adds a new chat message or refreshes the chat window. Since we already use the MessageAction() method on our PHP IndexController class to forward such responses to the browser, we'll simply amend it to also return a list of currently online users.
They work through the code updates to make it happen - changes to the MessageAction in the IndexController that include the addition of a few new methods.