# \[PHP\] TableModel Class

**URL:** <https://forum.kirupa.com/t/php-tablemodel-class/270886>\
**Category:** open source\
**Created:** [September 15, 2008, 8:40pm UTC](https://forum.kirupa.com/t/php-tablemodel-class/270886 "2008-09-15T20:40:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sage\_of\_Fire](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@Sage\_of\_Fire](https://forum.kirupa.com/u/Sage_of_Fire)\
**Post date:** [September 15, 2008, 8:40pm UTC](https://forum.kirupa.com/t/php-tablemodel-class/270886/1 "2008-09-15T20:40:37Z")

</div>

Here’s another simple class for making your life easier. I created TableModel to give me an easy way to turn a MySQL table into an HTML table. If you want to add database functionality to your site, but you don’t have a lot of experience, this is the class for you. If you pass it a database connection, the table you want indexed, how you want it ordered, and the table’s primary key, it will give you an HTML table; just wrap it in table tags and go!

You can find it [here](http://evankroske.com/projects.php), along with a brief explanation, or just download it now and see for yourself.
