数组过滤器只能删除没有空格的值(Array filter only remove the values without whitespaces)

编程入门 行业动态 更新时间:2024-10-23 20:26:18
数组过滤器只能删除没有空格的值(Array filter only remove the values without whitespaces)

数组示例

如上图所示,array_filter只删除像''而没有空格的值。 对于2值也为空的底部,但因为它有空白,所以它不会过滤它。 任何解决方案 我尝试preg_replace()和trim()也无法删除空值的空值...

Array Example

As the above pic show, the array_filter only remove the value which like ' ' without white space. For the bottom that 2 value is empty also but because it have white spaces so it wont filter it. Any solution? i try to preg_replace() and trim() also not able to remove the empty values with spaces...

更多推荐

本文发布于:2023-08-04 06:59:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1413140.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数组   过滤器   空格   Array   whitespaces

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!