The PHP-GTK Community site has a quick new post today showing how to create/empty out a GtkContainer or GtkWindow in your code.
This function provides an easy way to empty a GtkWindow/GtkContainer. I use it when i need to refresh a part of my app by replacing some widgets with others. It can destroy or preserve the child widgets depending on your needs.
They provide both the code itself and a sample usage - a three line script that shows three ways to use it - empty out a container, empty out the container but keep its children intact, and how to use it in the event of a button click.