note 77442 added to function.array-filter

From: Date: Wed, 29 Aug 2007 22:49:21 +0000
Subject: note 77442 added to function.array-filter
Groups: php.notes 
Request: Send a blank email to php-notes+get-129890@lists.php.net to get a copy of this message
Just a simplification of my function from last month. <?php function partition($input, $callback=null) { if(is_null($callback)) $true = array_filter($input); else $true = array_filter($input, $callback); $false = array_diff_key($input, $true); } ?> ---- Server IP: 203.89.181.186 Probable Submitter: 60.234.168.92 ---- Manual Page -- http://www.php.net/manual/en/function.array-filter.php Edit -- https://master.php.net/note/edit/77442 Del: integrated -- https://master.php.net/note/delete/77442/integrated Del: useless -- https://master.php.net/note/delete/77442/useless Del: bad code -- https://master.php.net/note/delete/77442/bad+code Del: spam -- https://master.php.net/note/delete/77442/spam Del: non-english -- https://master.php.net/note/delete/77442/non-english Del: in docs -- https://master.php.net/note/delete/77442/in+docs Del: other reasons-- https://master.php.net/note/delete/77442 Reject -- https://master.php.net/note/reject/77442 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#129890) next »