Created
July 26, 2018 19:44
-
-
Save ricardosaraiva/29046417264148a006f93a3147c3b089 to your computer and use it in GitHub Desktop.
Amigo oculto
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 | |
$participantes = [ | |
'Bruno', | |
'Maria', | |
'Cida', | |
'Euler', | |
'Marcos', | |
'Cleiton', | |
'Pedro' | |
]; | |
$amigos = []; | |
/* | |
preencher o array no seguinte formato | |
$amigo[] =['nome' => 'Nome da pessoa', 'amigo' => 'Nome do amigo']; | |
implementar algoritmo | |
*/ | |
//retorno | |
foreach ($amigos as $amigo) { | |
echo 'nome: ' . $amigo['nome'] . ' Amigo: ' . $amigo['amigo'] . PHP_EOL; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment