PHP Array into HTML Table: Generate HTML tables from data in arrays

Recommend this page to a friend!
  Info   View files Example   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 209 This week: 1All time: 8,239 This week: 313Up
Version License PHP version Categories
array-to-html-table 1.0.0GNU General Publi...5.4HTML, PHP 5
Description Author

This class can generate HTML tables from data in arrays

It can take arrays with data for the headers and body and generates HTML for a table.

The class also allows to pass array of CSS classes to assign to each table column, classes for each row, and hide specific columns.

Picture of Alexandre Sinício
  Performance   Level  
Name: Alexandre Sinício <contact>
Classes: 6 packages by
Country: Brazil Brazil
Age: 36
All time rank: 2303157 in Brazil Brazil
Week rank: 169 Up10 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 2x

Details
It can be a pain to format HTML tables. It can be a pain to output that array of data in an user-friendly way.

This class tries to simplify the job of creating these tables. The basic usage allows to output HTML code with just three lines.

The class also provides enough flexibility to set custom ID and classes to the table, rows and even individual cells.

Every suggestion and/or bug report will be mostly appreciated.
  Files folder image Files  
File Role Description
Accessible without login Plain text file 01_basic_usage.php Example Example - Basic usage
Accessible without login Plain text file 02_defining_classes.php Example Example - Defining classes to elements
Accessible without login Plain text file 03_custom_function_classes.php Example Example - Defining classes to elements through custom functions
Accessible without login Plain text file 04_custom_function_tr_id.php Example Example - Defining ID for 'tr' tags
Accessible without login Plain text file 05_hiding_columns.php Example Example - Hiding unwanted columns
Plain text file HTMLTable.php Class Source class file
Accessible without login Plain text file README.md Data README

 Version Control Unique User Downloads Download Rankings  
 0%
Total:209
This week:1
All time:8,239
This week:313Up

For more information send a message to info at phpclasses dot org.