Closing a page that is opened with PHP

So I needed to have a statement that closed out a page when success condition was met. Here is a quick snippet that worked like a charm for me.

echo “<script type=”text/javascript”>”.
This is great is you are passing a bytearray data, for instance, with POST and need to close out that pesky window.