Skip to content

Instantly share code, notes, and snippets.

@ricardosaraiva
Created July 26, 2018 19:44
Show Gist options
  • Save ricardosaraiva/29046417264148a006f93a3147c3b089 to your computer and use it in GitHub Desktop.
Save ricardosaraiva/29046417264148a006f93a3147c3b089 to your computer and use it in GitHub Desktop.
Amigo oculto
<?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