# Huge problem - Need to parse/complile a string and return as string

**URL:** <https://forum.kirupa.com/t/huge-problem-need-to-parse-complile-a-string-and-return-as-string/243315>\
**Category:** programming\
**Created:** [November 5, 2007, 7:11pm UTC](https://forum.kirupa.com/t/huge-problem-need-to-parse-complile-a-string-and-return-as-string/243315 "2007-11-05T19:11:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![x3brand](https://avatars.discourse-cdn.com/v4/letter/x/3be4f8/32.png) [@x3brand](https://forum.kirupa.com/u/x3brand)\
**Post date:** [November 5, 2007, 7:11pm UTC](https://forum.kirupa.com/t/huge-problem-need-to-parse-complile-a-string-and-return-as-string/243315/1 "2007-11-05T19:11:37Z")

</div>

I’m trying to load a php file into another php file but I need that first file to be parsed (meaning all the variables within it get assigned values from a db) before it gets loaded into its parent file.

I’ve been looking for a good 3-4 hours. I have tried eval(), compile(), and pretty much everything in the book ([php.net](http://php.net)).

Please, anyone, can you help me? Is there even a function that does this?
