Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test 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 5524 to 5549

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 17th November 2024 15:05 Europe/London time based on the source file dated 13th November 2024 14:05 Europe/London time.