# \[PHP\] Giving HTML PHP variable

**URL:** <https://forum.kirupa.com/t/php-giving-html-php-variable/203078>\
**Category:** programming\
**Created:** [October 7, 2006, 6:37am UTC](https://forum.kirupa.com/t/php-giving-html-php-variable/203078 "2006-10-07T06:37:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thesleuth](https://avatars.discourse-cdn.com/v4/letter/t/e99b99/32.png) [@thesleuth](https://forum.kirupa.com/u/thesleuth)\
**Post date:** [October 7, 2006, 6:37am UTC](https://forum.kirupa.com/t/php-giving-html-php-variable/203078/1 "2006-10-07T06:37:00Z")

</div>

Please ignore the title…

## I have a template engine which will display articles(from database) however, I have many articles, each with its own page (article\_title.php, title\_2.php, etc…) And all I have in each page is a PHP code for the template engine and the code to retrieve the article from the DB. DB Table - The Idea:

## | Article Name | Article |

## | article\_title.php | Blah, blah blah…|

## | title\_2.php | Blah, blah blah… |

Is there anyway that I can define one file to be my main file and use htaccess to “include” that main file and tell it to retrive according to the file name.
