array_filter, Remove empty elements from PHP array Example 1)Remove empty string elementsElements made up of white space are not removed. $arr = array("lemon", "", "", "\t\n", "orange");$reduced_arr = array_filter($arr);print_r($reduced_arr); # Array# (# [0] => lemon# [3] => # # [4] => orange# ) Example 2)trim() removes whitespace from an empty string $arr = array("lemon", "", "", "\t\n", "orang..