How do i transform filtered array output to new array?

后端 未结 0 2016
生来不讨喜
生来不讨喜 2020-11-28 08:14

$a = [1, 2, \'\', \'\', 5, \'\'];

$b = array_filter($a);

the output of this array will be

$b = [0=>1 , 1=>2, 4=>5];

how do i convert the

相关标签:
回答
  • 消灭零回复
提交回复
热议问题