Created
October 15, 2018 15:29
-
-
Save pierrealexaline/030e91db64c9ba5bed83629a81799ede to your computer and use it in GitHub Desktop.
Php functions 1
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 | |
function writeSecretSentence( string $para1 = "", string $para2 = "" ):string | |
{ | |
$retour = $para1." s'incline face à ".$para2."<br>\n"; | |
return $retour; | |
} | |
$environnement = array('lune','terre','univers','galaxy'); | |
$animaux = array('lion','tigre','panthère'); | |
foreach($environnement as $key=>$value) | |
{ | |
foreach($animaux as $k=>$v) | |
{ | |
echo writeSecretSentence($v,$value); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment