note 76517 added to ref.array
| From: | shufty at gmail dot com | Date: | Thu, 19 Jul 2007 02:20:12 +0000 |
| Subject: | note 76517 added to ref.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128706@lists.php.net to get a copy of this message | ||
when using Nimja's function, it was removing values that equaled 0, the following function
counters this
<?php
function cleanArray($array) {
foreach ($array as $key => $value) {
if ($value == "") unset($array[$key]);
}
return $array;
}
?>
----
Server IP: 194.145.210.3
Probable Submitter: 81.178.213.69
----
Manual Page -- http://www.php.net/manual/en/ref.array.php
Edit -- https://master.php.net/note/edit/76517
Del: integrated -- https://master.php.net/note/delete/76517/integrated
Del: useless -- https://master.php.net/note/delete/76517/useless
Del: bad code -- https://master.php.net/note/delete/76517/bad+code
Del: spam -- https://master.php.net/note/delete/76517/spam
Del: non-english -- https://master.php.net/note/delete/76517/non-english
Del: in docs -- https://master.php.net/note/delete/76517/in+docs
Del: other reasons-- https://master.php.net/note/delete/76517
Reject -- https://master.php.net/note/reject/76517
Search -- https://master.php.net/manage/user-notes.php