" . $input . "";
} else {
return "
" . "" . $input . "" . " | ";
}
}
public static function generateHTMLEnd( string $filePath, bool $active = true ) {
if ( !$active ) {
return;
}
$file = fopen( $filePath, 'a' );
fwrite( $file, "" );
fclose( $file );
}
public static function generateHTMLtableRow(
string $filePath,
array $rows,
bool $bold = false,
bool $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(
string $filePath,
array $headrows = [ "name", "Tex-Input", "MathML(MathJax3)", "MathML(WikiTexVC)" ],
bool $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 );
}
}