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 5393 to 5418

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 21st May 2024 21:35 Europe/London time based on the source file dated 17th May 2024 16:45 Europe/London time.