array_map_assoc() With Keys

no-email (Damien Seguy), Damien Seguy
Mon, 28 Oct 2024 00:00:00 +0000

array_map() only provides the value of the array, not the key. To access the key, one must use the extra argument, and array_keys().
Beware that the order of the arguments is now value first, key second, not the usual ``$key => $value``.