Skip to content

Instantly share code, notes, and snippets.

@Cynnah
Created September 25, 2019 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Cynnah/b2ee3a4826fe3a6d223946a1da7b329f to your computer and use it in GitHub Desktop.
Save Cynnah/b2ee3a4826fe3a6d223946a1da7b329f to your computer and use it in GitHub Desktop.
Quest WCS 4 Array and loops
<?php
$listOfMovies = [
"Indiana Jones et la Dernière Croisade" => ["Harrison Ford","Sean Connery","Denholm Elliott"],
"Indiana Jones et le Temple maudit" => ["Harrison Ford","Kate Capshaw","Jonathan Ke Quan"],
"Les Aventuriers de l'Arche perdue" => ["Harrison Ford","Cate Blanchett","Paul Freeman"]
];
foreach ($listOfMovies as $movie => $actor) {
echo "Dans le film " . $movie . ", les principaux acteurs sont : " . $actor[0] . ", " . $actor[1] . ", " . $actor[2] . "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment