show()
show(array $data, string $title = 'Data Table', array $opts = array()) : integer
Tabular data display
Parameters
array |
$data |
|
string |
$title |
|
array |
$opts |
|
Returns
integer
Examples
// like from database query's data.
$data = [
[ col1 => value1, col2 => value2, col3 => value3, ... ], // first row
[ col1 => value4, col2 => value5, col3 => value6, ... ], // second row
... ...
];
Show::table($data, 'a table');
// use custom head
$data = [
[ value1, value2, value3, ... ], // first row
[ value4, value5, value6, ... ], // second row
... ...
];
$opts = [
'showBorder' => true,
'columns' => [col1, col2, col3, ...]
];
Show::table($data, 'a table', $opts);
```
** File not found : ```php **