01 | | 02 | | 03 | | 04 | | 05 | | 06 | | 07 | | 08 | | 09 | | 10 | | 11 | | 12 | | 13 | | 14 | | 15 | | 16 | | 17 | | 18 | | 19 | | 20 | | 21 | | 22 | | 23 | | 24 | | 25 | | 26 | | 27 | | 28 | | 29 | |
|
<?php
|
| $users = [
| ['first_name' => 'Jed', 'last_name' => 'Lopez'],
| ['first_name' => 'Carlos', 'last_name' => 'Granados'],
| ['first_name' => 'Dirty', 'last_name' => 'Diana'],
| ['first_name' => 'John', 'last_name' => 'Williams'],
| ['first_name' => 'Betty', 'last_name' => 'Boop'],
| ['first_name' => 'Dan', 'last_name' => 'Daniels'],
| ['first_name' => 'Britt', 'last_name' => 'Anderson'],
| ['first_name' => 'Will', 'last_name' => 'Smith'],
| ['first_name' => 'Magic', 'last_name' => 'Johnson'],
| ];
|
| var_dump(dictionaryFilterList(['Dirty', 'Dan'], $users, 'first_name'));
|
| // sortie: La fonction à  "nettoyer" les 2 éléments (Dirty et Dan)
| [
| ['first_name' => 'Jed', 'last_name' => 'Lopez'],
| ['first_name' => 'Carlos', 'last_name' => 'Granados'],
| ['first_name' => 'John', 'last_name' => 'Williams'],
| ['first_name' => 'Betty', 'last_name' => 'Boop'],
| ['first_name' => 'Britt', 'last_name' => 'Anderson'],
| ['first_name' => 'Will', 'last_name' => 'Smith'],
| ['first_name' => 'Magic', 'last_name' => 'Johnson']
| ]
| ?>
|
| |
|