Mar 28

ImpTable: a PHP5 wrapper for YUI DataTable

Yahoo has included a rich table control in YUI. I've been using a simple ImpTable class for years but decided to convert it to a YUI DataTable. The goal is simplicity: ImpTable now allows you to create a DataTable using as few as two lines of PHP while still allowing you to customize it extensively using CSS and JavaScript to take advantage of DataTable's rich set of features.

Here's an example of an ImpTable created when my database wrapper class (ImpDB) is profiling database activity: ImpTable reporting database queries

ImpTable tries to make the process of including a YUI DataTable as simple as possible, including automatically loading YUI if your page does not already use it. If you're already using YUI, I strongly recommend loading the DataTable and DataSource modules along with your other components to avoid version mismatches.

You can download ImpTable directly or check out a copy of the Subversion repository which contains it: svn co http://svn.improbable.org/ImpUtils/branches/trunk ImpUtils

For details including usage of xmlHttpRequest data and scripting please visit the Demonstrations.