" . $input . "";
} else {
return "
" . "" . $input . "" . " | ";
}
}
public static function generateHTMLEnd( $filePath, $active = true ) {
if ( !$active ) {
return;
}
$file = fopen( $filePath, 'a' );
fwrite( $file, "" );
fclose( $file );
}
public static function generateHTMLtableRow( $filePath, $rows, $bold = false, $active = true ) {
if ( !$active ) {
return;
}
$file = fopen( $filePath, 'a' );
$stringData = "";
foreach ( $rows as $row ) {
$stringData .= self::generateHTMLtableItem( $row, $bold );
}
$stringData .= "
";
fwrite( $file, $stringData );
fclose( $file ); // tbd only open close once for all tests
}
public static function generateHTMLstart( $filePath, $headrows = [ "name","Tex-Input",
"MathML(MathJax3)","MathML(TexVC)" ], $active = true ) {
if ( !$active ) {
return;
}
$htmlRows = "";
foreach ( $headrows as $header ) {
$htmlRows .= "" . $header . " | ";
}
$file = fopen( $filePath, 'w' ); // or die("error");
$stringData = /** @lang HTML */
<<
{$htmlRows}
HTML;
fwrite( $file, $stringData );
fclose( $file );
}
}