Hi,
Not sure what you are saying..
But eeh.. Couldn't you not output untill you get to the switch? I usually use a template for my layout, which I include later on. So all my PhP output is stored in a bunhc of variables, which are subsequently placed in the right location after processing all the info, and the page gets produced in one go. Big advantage is that you can change the layout file and create a complete new look to your site.
a template I use:
<?php
if(!isset($footer))
{
$footer = "© <a target=\"_new\" href=\"http://www".$domain."\">".$owner."</a>.
Problems with this website: <a target=\"_new\" \".$admin_url.\">Contact webadmin</a>";
}
?>
<div id="banner1">
<? echo $head_title;?>
</div>
<div id="banner2">
<?
echo $toptitle;
?>
</div>
<div id="container">
<div id="nav">
<?
echo $menu;
?>
</div>
<div id="rightbox">
<div class="content">
<? echo $rightcontent ?>
</div>
</div>
<div id="contentarea">
<br>
<div class="content">
<? echo $body; ?>
</div>
</div>
</div>
<div id="footer">
<?
echo $footer;
?>
</div>