note 126319 added to function.array-filter
| From: | steven at nevvix dot com | Date: | Sun, 08 Aug 2021 01:36:43 +0000 |
| Subject: | note 126319 added to function.array-filter | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-216754@lists.php.net to get a copy of this message | ||
If you want to keep the non-empty values and filter out the rest:
<?php
$result = array_diff_key($array, array_filter($array));
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.85.242 (proxied: 162.245.246.25)
----
Manual Page -- https://php.net/manual/en/function.array-filter.php
Edit -- https://main.php.net/note/edit/126319
Del: integrated -- https://main.php.net/note/delete/126319/integrated
Del: useless -- https://main.php.net/note/delete/126319/useless
Del: bad code -- https://main.php.net/note/delete/126319/bad+code
Del: spam -- https://main.php.net/note/delete/126319/spam
Del: non-english -- https://main.php.net/note/delete/126319/non-english
Del: in docs -- https://main.php.net/note/delete/126319/in+docs
Del: other reasons-- https://main.php.net/note/delete/126319
Reject -- https://main.php.net/note/reject/126319
Search -- https://main.php.net/manage/user-notes.php