Last active
March 10, 2018 13:38
-
-
Save Jules59/281598eedac54160d72255d08e819dd7 to your computer and use it in GitHub Desktop.
array for Indiana Jones
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//first Solution | |
$movieindy = array("Les Aventuriers de l'Arche Perdu" => 'Harrison Ford , Paul Freeman , Karen Allen' , "Indiana Jones et le Temple Maudit" => 'Harrison Ford , Kate Capshaw , Jonathan Ke Quan' , "Indiana Jones et la Diernières Croisade" => 'Harrison Ford , Sean Connery, Denholm Elliott'); | |
foreach($movieindy as $key => $value) { | |
echo "Dans $key les acteurs principaux sont: $value. <br>"; | |
} | |
echo"<br>"; | |
//Or Second Solution | |
$movie["Les Aventuriers de l'Arche Perdu"] = 'Indiana Jones , Paul Freeman , Karen Allen'; | |
$movie["Indiana Jones et le Temple Maudit"] = 'Indiana Jones , Kate Capshaw , Jonathan Ke Quan'; | |
$movie["Indiana Jones et la Dernière Croisade"] = 'Indiana Jones , Sean Connery , Denholm Elliott'; | |
foreach($movie as $key => $value) { | |
echo "Dans $key les acteurs principaux sont: $value. <br>"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment