How do you remove the lines that have empty elements from a multidimensional-array in PHP?
For instance, from:
1: a, b, c, d 2: d, _, b, a 3: a, b, _, _
$arr = array(... your multi dimension array here ...); foreach($arr as $idx => $row) { if (preg_grep('/^$/', $row)) { unset($arr[$idx]); } }