From what I have studied, headers cannot be changed after there is an output from a script.
Why is it then that in this code sample that I wrote, the script has several outputs before it creates a new header, and yet everything works fine?

```
<?php
$name = "tommy" ;
?>

<?php 
headers_sent($filename, $linenum) ;
header("name: $name") ;
echo "tommy <br>" ;
echo "Headers  sent in $filename on line $linenum" ;
?>

```

In addition the output says that the headers were sent in line 0... how is that possible if I added a header afterwards?