Insert a table with 3 rows and background color for the table in php without css

hi everyone
this the code i have:

<?php 
 
// create a multidimensional array to hold the table data 
$data = array( 
    array("Name", "Age", "Gender"), 
    array("John", "25", "Male"), 
    array("Jane", "30", "Female"), 
    array("Bob", "42", "Male") 
); 
 
// create the HTML table 
echo "<table>"; 
foreach ($data as $row) { 
    echo "<tr>"; 
    foreach ($row as $cell) { 
        echo "<td>" . $cell . "</td>"; 
    } 
    echo "</tr>"; 
} 
echo "</table>"; 
 
?>

how can i insert a table with 3 rows horizontally in middle of my php page without css?need rows to be next to each other, in middle but filled the entire width of the page.its an a4 page

example:

i appreciate your help

Have a look at this :

<?php
$data = array(
    array("Name", "Age", "Gender"),
    array("John", "25", "Male"),
    array("Jane", "30", "Female"),
    array("Bob", "42", "Male")
);

echo '<table style="margin: 0 auto; width: 100%;">';
foreach ($data as $row) {
    echo "<tr>";
    foreach ($row as $cell) {
        echo "<td style='border: 1px solid black; padding: 10px;'>$cell</td>";
    }
    echo "</tr>";
}
echo "</table>";
?>
Sponsor our Newsletter | Privacy Policy | Terms of Service