note 59786 deleted from language.functions by cece
| From: | cece@php.net | Date: | Fri, 27 Jan 2006 10:42:37 +0000 |
| Subject: | note 59786 deleted from language.functions by cece | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-102552@lists.php.net to get a copy of this message | ||
Note Submitter: illium37
----
i needed a little function to compact an array that ended up with blank entries.. here's a
little array compacting function:
<?PHP
function compact_array($array)
{
foreach ($array as $entry)
if (trim($entry) != '') $compacted[] = $entry;
return $compacted;
}
?>
hope that helps!