Last updated on January 17, 2018
This post is about removing empty elements from the given array using PHP. Here is example
$test_array = array('foo', 'bar', '', 'sleep', '',null,'arjun'); $test_array = array_filter($test_array); print_r($test_array);
Functions :
array_filter — Filters elements of an array using a callback function