I changed that line to
PHP Code:
$ocfapidata .= "src=\"".$stylevar[imgdir_button]."/collapse_thead";
$collapsenum = "collapseimg_359_eveit_".$ig;
$ocfapidata .= $vbcollapse[$collapsenum];
and it got rid of the error. I found the reason the boxes weren't repeating

That first line in the code had = rather than .=, which is now fixed, and the page is working fine. I'd still like to have a header on collapsed tbody, though...