x115/D2.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 array($countries); $countries['Nederland']='Amsterdam'; $countries['België']='Brussel'; $countries['Polen']='Warschau'; $countries['Duitsland']='Berlijn'; ksort($countries); foreach ($countries as $key => $value) { echo "<div>De hoofdstad van $key is $value"; } //print_r($countries); ?> </body> </html>

Resultaat

Made by Thijs Aarnoudse