note 103168 added to function.array-flip
| From: | Munk at osu1 dot php dot net | Date: | Tue, 29 Mar 2011 20:03:35 +0000 |
| Subject: | note 103168 added to function.array-flip | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-178321@lists.php.net to get a copy of this message | ||
@h3x for null value removal there is also array_filter, in fact for your use
<?php
$ary = array_filter( $ary );
?>
may work on its own, however a more correct version may be
<?php
$ary = array_filter( $ary, function( $value ) { return ! is_null( $value ); } );
?>
----
Server IP: 69.147.83.197
Probable Submitter: 173.9.92.113
----
Manual Page -- http://www.php.net/manual/en/function.array-flip.php
Edit -- https://master.php.net/note/edit/103168
Del: integrated -- https://master.php.net/note/delete/103168/integrated
Del: useless -- https://master.php.net/note/delete/103168/useless
Del: bad code -- https://master.php.net/note/delete/103168/bad+code
Del: spam -- https://master.php.net/note/delete/103168/spam
Del: non-english -- https://master.php.net/note/delete/103168/non-english
Del: in docs -- https://master.php.net/note/delete/103168/in+docs
Del: other reasons-- https://master.php.net/note/delete/103168
Reject -- https://master.php.net/note/reject/103168
Search -- https://master.php.net/manage/user-notes.php