I'm trying to figure how to convert an array into a string but don't know how to do it. Keep saying Array to string conversion in my function table_header or function labelheader_cell. I'm trying to understand how to convert an array into string keep giving me an error.
Here is my code:
function table_header($labels, $params='')
{
    start_row();
    foreach ($labels as $label)
        labelheader_cell($label, $params);
    end_row();
}
    function labelheader_cell($label, $params="")
    {
        echo "<td class='tableheader' $params>$label</td>\n";
    }
    function view($trans)
    {
        return get_view($trans["user_no"]);
    }
    $th = array(_("Period"), _("Amount") => array('fun'=>'view'), _("Last Year"), array('insert'=>true, 'fun'=>'edit_link'), array('insert'=>true, 'fun'=>'edit'));
        table_header($th);