Why not just make the .txt a .php extension and include it?
Otherwise maybe you can try something like the eval function
http://us2.php.net/eval and see if that works.
-- below may or may not work for you --
$text = join('', file('/path/to/text/file'));
echo eval($text);