Skip to content

Instantly share code, notes, and snippets.

@Jul10l1r4
Last active December 11, 2017 23:06
Show Gist options
  • Save Jul10l1r4/1b2491e88966e09767ea8b651ead8ff9 to your computer and use it in GitHub Desktop.
Save Jul10l1r4/1b2491e88966e09767ea8b651ead8ff9 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 ){
print_r( $ValorQueVaiCorrer );
}
// saída
// Array
// (
// [idade] => 29
// [nome] => Marcos lucim
// )
// Array
// (
// [idade] => 20
// [nome] => Marcos
// )
// Array
// (
// [idade] => 50
// [nome] => Marcelo dougras
// )
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment