Skip to content

Instantly share code, notes, and snippets.

@Jul10l1r4
Created December 11, 2017 23:42
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 Jul10l1r4/f63071ed682fc2f7af38823a6e11e722 to your computer and use it in GitHub Desktop.
Save Jul10l1r4/f63071ed682fc2f7af38823a6e11e722 to your computer and use it in GitHub Desktop.
foreach created by Jul10l1r4 - https://repl.it/@Jul10l1r4/foreach
<?php
$users = [
[ 'idade' => 29, 'nome' => 'Marcos lucim' ],
[ 'idade' => 20, 'nome' => 'Marcos ' ],
[ 'idade' => 50, 'nome' => 'Marcelo dougras' ],
];
foreach ( $users as $ValorQueVaiCorrer ){
echo ($ValorQueVaiCorrer["nome"]."\n");
}
// Saída:
// Marcos lucim
// Marcos
// Marcelo dougras
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment