how to get rid of empty elements
Posted
by user295189
on Stack Overflow
See other posts from Stack Overflow
or by user295189
Published on 2010-06-02T18:42:38Z
Indexed on
2010/06/02
18:54 UTC
Read the original article
Hit count: 136
I have an array thats generated dynamically and it has some empty elements. How do I get rid of empty elements from an array?
array
0 => string '' (length=0)
1 => string 'x%6wm' (length=5)
2 => string 'x%6wmvf' (length=7)
3 => string 'x%645' (length=5)
4 => string '' (length=0)
And I want it to become like
array
0 => string 'x%6wm' (length=5)
1 => string 'x%6wmvf' (length=7)
2 => string 'x%645' (length=5)
Thanks
© Stack Overflow or respective owner