ok, i've tried that, and i think its a good solution, but i can implement it. the way i'm getting the pages is by an include. what i originally tried was
"str_replace("__self", $HTTP_SERVER_VARS['PHP_SELF'], @include $test)"
but that doesn't work. i think because the str_replace gets the return value of the include function, which will be a 1. is there another way to get the contents of the page referenced by $test?