php7-mysql-data/Kapitel_2/Lektion_10/5_mehrdimensional.php

22 lines
336 B
PHP
Raw Permalink Normal View History

2016-08-16 21:20:53 +02:00
<?php
$personen = [
[
'vorname' => 'Max',
'nachname' => 'Muster'
],
[
'vorname' => 'Barbara',
'nachname' => 'Beispiel'
]
];
foreach ($personen as $person) {
var_dump($person);
echo '<br>';
}
foreach ($personen as $person) {
var_dump($person['nachname']);
echo '<br>';
}