function strDisplayUserTableMulti(&$uTable)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     $strOut = '';
     $lTableID = $uTable->lKeyID;
     $strTable = $uTable->strDataTableName;
     $lFID = $this->lForeignID;
     $bCollapsibleHeadings = $uTable->bCollapsibleHeadings;
     $bCollapseDefaultHide = $uTable->bCollapseDefaultHide;
     $strSafeTableName = htmlspecialchars($uTable->strUserTableName);
     $strOut .= $this->strBeginCollapsibleHeading($lTableID, $strSafeTableName, false);
     $strOut .= '<b><i>' . htmlspecialchars($uTable->strUserTableName) . '</b> (multi-record table)</i> ';
     $lNumRecs = $this->lNumMultiRecsViaFID($uTable, $lFID);
     // it's the little things that make a house a home.
     $strOut .= '&nbsp;&nbsp;&nbsp;<b>' . $lNumRecs . '</b> record' . ($lNumRecs == 1 ? '' : 's');
     if ($lNumRecs > 0) {
         $strOut .= '&nbsp;' . strLinkView_UFMFRecordsViaFID($uTable->enumTType, $lTableID, $lFID, 'View', true) . '&nbsp;' . strLinkView_UFMFRecordsViaFID($uTable->enumTType, $lTableID, $lFID, 'View', false);
     }
     $strOut .= '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . strLinkAdd_UFMultiRecEntry($uTable->enumTType, $lTableID, $lFID, true, 'Add record', ' id="mptabAddRec_' . $lTableID . '" ') . '&nbsp;' . strLinkAdd_UFMultiRecEntry($uTable->enumTType, $lTableID, $lFID, false, 'Add record', ' id="mptabAddRec1_' . $lTableID . '" ') . '&nbsp;';
     $strOut .= $this->strEndCollapsibleHeading();
     return $strOut;
 }
<?php

global $glLabelWidth;
echoT($strHTMLSummary);
$glLabelWidth = 150;
echoT('<br>');
if ($bMultiEntry && !($bCProg && $bEnrollment)) {
    $strALabel = $bCProg && !$bEnrollment ? $utable->cprog->strSafeAttendLabel : '';
    echoT(strLinkAdd_UFMultiRecEntry($utable->enumTType, $lTableID, $lFID, true, 'Add ' . $strALabel . ' record', '', $lEnrollRecID) . '&nbsp;' . strLinkAdd_UFMultiRecEntry($utable->enumTType, $lTableID, $lFID, false, 'Add ' . $strALabel . ' record', '', $lEnrollRecID) . '<br><br>');
}
if ($utable->lNumFields == 0 && !$bCProg) {
    echoT('<br><i>There are no fields defined in table <b>' . htmlspecialchars($utable->strUserTableName) . '</b></i><br><br>');
    return;
}
openMRecTable($strTableLabel, $utable);
if ($lNumMRRecs > 0) {
    writeMRecRows($lTableID, $lFID, $utable, $mRecs, $lEnrollRecID);
}
closeMRecTable($utable);
function writeMRecRows($lTableID, $lFID, &$utable, &$mRecs, $lEnrollRecID)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $genumDateFormat;
    $strFNPrefix = $utable->strFieldPrefix;
    $strFNKeyID = $strFNPrefix . '_lKeyID';
    if ($utable->bCProg) {
        $lCProgID = $utable->cprog->lKeyID;
    }
    $bReadOnly = $utable->bReadOnly;