Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

render_array_in_table_cells()

Description

Render multimensional array or object to display within table cells

Parameters

ColumnTypeDefaultDescription
$array array

Return

void

Location

include/render_functions.php lines 5449 to 5474

Definition

 
function render_array_in_table_cells($array)
    {
    foreach(
$array as $name => $value)
        {
        echo 
'<table class="TableArray">';
        echo 
"<tr><td width='50%'>";
        echo 
escape($name);
        echo 
"</td><td width='50%'>";

        if(
is_array($value))
            {
            
render_array_in_table_cells($value);
            }
        elseif(
is_bool($value))
            {
            echo 
$value "TRUE" "FALSE";
            }
        else
            {
            echo 
escape((string)$value);
            }
                
        echo 
"</td></tr>";
        echo 
"</table>";
        }
    }

This article was last updated 19th March 2024 04:05 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.