public static array2table ( array $array, boolean $transpose = false, boolean $recursive = false, boolean $typeHint = true, array $tableOptions = ['class' => 'table table-bordered table-striped'], array $keyOptions = [], array $valueOptions = ['style' => 'cursor: default; border-bottom: 1px #aaa dashed;'], string $null = '<span class="not-set">(not set)</span>' ) : string | boolean | ||
$array | array | the associative array to be converted |
$transpose | boolean | whether to show keys as rows instead of columns. This parameter should be used only for a single dimensional associative array. If used for a multidimensional array, the sub array will be imploded as text. |
$recursive | boolean | whether to recursively generate tables for multi-dimensional arrays |
$typeHint | boolean | whether to show the data type as a hint |
$tableOptions | array | the HTML attributes for the table |
$keyOptions | array | the HTML attributes for the array key |
$valueOptions | array | the HTML attributes for the array value |
$null | string | the content to display for blank cells |
return | string | boolean |