# Alternative to include()?

**URL:** <https://forum.kirupa.com/t/alternative-to-include/256767>\
**Category:** Uncategorized\
**Created:** [April 7, 2008, 3:50am UTC](https://forum.kirupa.com/t/alternative-to-include/256767 "2008-04-07T03:50:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Icy\_Penguin](https://avatars.discourse-cdn.com/v4/letter/i/f6c823/32.png) [@Icy\_Penguin](https://forum.kirupa.com/u/Icy_Penguin)\
**Post date:** [April 7, 2008, 3:50am UTC](https://forum.kirupa.com/t/alternative-to-include/256767/1 "2008-04-07T03:50:21Z")

</div>

Hi everyone,

Working on a basic framework for a new project.

For each page, I have some variables saying which CSS and JS files are loaded, etc.

Then, I have the content included in that same file (e.g., for index.php, include index\_content.php, which has all the text and mysql stuff in it).

My question is, for organization’s sake (I’d rather have one file for each page rather than two) - is there a way to assign all of the code in index\_content.php to one variable for use later?
