@stevetwitte/

GregariousBiodegradableTransformations

PHP (Legacy)

No description

fork
loading
main.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$parties = [
  ['id' => 1, 'name' => 'Dude'],
  ['id' => 2, 'name' => 'Man']
];

var_dump($parties);

foreach ($parties as $party) {
  var_dump($party['id']);
}

$partyIds = array_map(function($party) {
    return $party['id'];
}, $parties);

var_dump($partyIds);
PHP 7.0.8 (Legacy: use the following for new features: Command-line PHP: https://repl.it/languages/php_cli PHP Web Server: https://repl.it/languages/php7