function array_display($array, $pre=FALSE)
{
$tag = $pre ? 'pre' : 'p';
printf("<%s>%s%s>\n", $tag, var_export($array, TRUE), $tag);
}
$arr = array(2, 'two', 0, 'NULL', NULL, 'FALSE', FALSE, 'empty', '');
$copy = array_filter($arr);
$reindexed = array_values($copy);
print 'Original:
';
array_display($arr, TRUE);
print 'Filtered:
';
array_display($copy, TRUE);
print 'Filtered and re-indexed:
';
array_display($reindexed, TRUE);
?>