<?php $entry = array( 0 => 'foo', 1 => false, 2 => -1, 3 => NULL, 4 => '' ); print_r(array_filter($entry));