This will let you do it after the headers are sent, but of course it requires javascript to be enabled:
## Jump and slowjump, for redirecting after printed header ##
function jump($file) {
echo "
<script>
window.location.replace(\"$file\");
</script>
";
}
function slowjump($file) {
echo "
<script>
function redirect() {
window.location.replace(\"$file\");
}
setTimeout(\"redirect();\", 2000);
</script>
";
}
## Called with ##
jump("index.php");
knutm