array_filter — Filters elements of an array using a callback function
array array_filter ( array $input [, callback $callback ] )
Can callback get the key of the current array value and how?
From the documentation:
PHP 5.6.0 Added optional flag parameter and constants ARRAY_FILTER_USE_KEY
and ARRAY_FILTER_USE_BOTH
http://php.net/manual/en/function.array-filter.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With