Alternatively you could use output buffering. Very rough example:
$title = 'This is the HTML title!';
echo 'Hello world!';
<title><?php echo $title; ?></title>
<?php echo $content; ?>
Basically this will first execute the file view.php (which sets $title) and store the result in $content. The variable $content can then be used in the template.php.
$content = ob_get_clean();
Again, the example is very rough but I hope you get the idea. If not I'd be happy to elaborate