Skip to content

Instantly share code, notes, and snippets.

@Florencelg
Created September 13, 2018 14:01
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 Florencelg/6f1889e76bd9f722e92e5c26bd5eea24 to your computer and use it in GitHub Desktop.
Save Florencelg/6f1889e76bd9f722e92e5c26bd5eea24 to your computer and use it in GitHub Desktop.
Les tableaux et boucles en php
<?php
$movies = [
'Indiana Jones and the Kingdom of the Crystal Skull' => ['Harrison Ford','Cate Banchett','Karen Allen'],
'Indiana Jones and the Last Crusade' => ['Harrison Ford','Sean Connery','Denholm Elliott'],
'Indiana Jones and the Temple of Doom' => ['Harrison Ford','Kate Capshaw','Jonathan Ke Quan']
];
foreach ($movies as $movie => $actor){
echo "Dans le film: $movie, les acteurs sont : $actor[0], $actor[1], $actor[2]. <br/><br/>";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment