l101/opdrachten/H10/10.4.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
$woorden = [];
$woorden['Hallo'] = 'Hello';
$woorden['Boom'] = 'Tree';
$woorden['Auto'] = 'Car';
$woorden['Fiets'] = 'Bicycle';
$woorden['Trompet'] = 'Trompet';
$woorden['Geodriehoek'] = 'Drafting Triangle';
foreach($woorden as $nederlands => $engels){
echo "<div>De engelse vertaling van $nederlands is $engels</div>";
}
?>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse