What is the difference between arrays and tables in PHP, and how can one implement tabular structures using arrays?

Arrays in PHP are a data structure that can hold multiple values. Tables, on the other hand, are typically used in databases to store data in a structured format. To implement tabular structures using arrays in PHP, you can create an array of arrays where each sub-array represents a row in the table.

// Creating a tabular structure using arrays
$table = array(
    array('Name', 'Age', 'City'),
    array('John', 25, 'New York'),
    array('Jane', 30, 'Los Angeles'),
    array('Mike', 22, 'Chicago')
);

// Displaying the table
echo "<table border='1'>";
foreach ($table as $row) {
    echo "<tr>";
    foreach ($row as $cell) {
        echo "<td>$cell</td>";
    }
    echo "</tr>";
}
echo "</table>";