libclass-html-data-table.php

HTML Data Table classes and functions.

Classes

Html_Table_Cell Represents a cell in a <code>Html_Table_Row</code>.
Html_Table_Row Represents a row in a <code>Html_Data_Table</code>.
Html_Data_Table Represents a HTML table. This class allows you to build a table by sequentially adding headings, rows, data, etc, and then outputting to either HTML, and array or JSON.

Functions

b2_format_html_attributes()

b2_format_html_attributes(array  $atts): string

Formats an array of attributes into a string to be used inside a HTML tag.

The first attribute will contain a single space before it.

E.g. b2_format_html_attributes( array( 'data-thing' => 'foo', 'class' = 'test' ) )

would give this string:

' data-thing="foo" class="test"'

Parameters

array $atts

The attributes to format

Returns

string —

The attribute string