<?php
$array = array(array('data1','data1'), array('data2','data2'), array('',''), array('data4','data4'));
$array = array_filter(array_map('array_filter', $array));
print_r($array);
- Output for 5.6.38, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.27, 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
- Array
(
[0] => Array
(
[0] => data1
[1] => data1
)
[1] => Array
(
[0] => data2
[1] => data2
)
[3] => Array
(
[0] => data4
[1] => data4
)
)
preferences:
95.57 ms | 408 KiB | 5 Q