How can I write all values into an HTML table?
This is the Array:
Array
(
[data] => Array
(
[0] => Array
(
[0] =>
[1] => sortprice
[2] => sortdate
)
[1] => Array
(
[0] => a lorem ipsum
[1] => 1. Preis
[2] => 1998
)
[2] => Array
(
[0] => b lorem ipsum
[1] => 2. Preis
[2] => 1997
)
[3] => Array
(
[0] => c lorem ipsum
[1] => 3. Preis
[2] => 1996
)
)
)
I can only output all values. Like this:
foreach ($table['data'] as $v1) {
foreach ($v1 as $v2) {
echo "$v2\n";
}
}
How can I access the values $ table ['data'] [1] .. with a foreach? To write them into a table cell like this:
<table> <tr> <td>a lorem ipsum</td> <td>1. Preis</td> <td>1998</td> </tr> ..... </table>