Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video 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 4904 to 4929

Definition

 
function render_array_in_table_cells($array)
    {
    foreach(
$array as $name => $value)
        {
        echo 
'<table class="TableArray">';
        echo 
"<tr><td width='50%'>";
        echo 
htmlspecialchars($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 
htmlspecialchars($value);
            }
                
        echo 
"</td></tr>";
        echo 
"</table>";
        }
    }

This article was last updated 25th January 2021 09:05 Europe/London time based on the source file dated 21st January 2021 17:00 Europe/London time.