To allow for the creation of rows with horizontal bars in the HTML table, you can add another parameter to the generateHTMLTable
function to specify which rows should have horizontal bars and then add CSS classes accordingly. Here's the modified function:
<?php
function generateHTMLTable($data, $tableClass = '', $headerRowClass = '', $dataRowClass = '', $barRowIndices = []) {
if (empty($data)) {
return ''; // Return an empty string if the data array is empty
}
$html = '<table';