Class calling itself?

Alright, I'm developing an ultra-lightweight PHP class to parse basic XHTML templates and have hit a snag. Some of my templates include other templates to reduce file-size and repetitive code, as well as allowing things like menus to be modified by editing one single file instead of a menu on every page.

What happens is when my template-parser attempts to replace tags in a sub-template, the page never loads at all. It just completely stops working. I get nothing from the server, even if I wrap every line with "echo" statements.

Here is the function in question:[code] //Public method to replace all tags on the page with their respective data public function ReplaceTags($Tags = array()) { $SubPage = new Page(NULL);

return true; }[/code]If I comment out the stuff after checking to see whether or not the file exists, everything works except sub-templates don't get parsed and as such, display funky tags instead of data. The class is called "Page".-[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]