PHP remove empty tring from array

I'm trying to remove all empty strings "" from the kat-array. I tried to do it by using array_filter function like this:

$array = array_filter($array, "strlen");

The problem is that kat[4] is now an object instead of an array.

Any idea how I can remove empty stings from an array without transforming them into an object?

Before

enter image description here

After

enter image description here



from Recent Questions - Stack Overflow https://ift.tt/3nZ1gDw
https://ift.tt/38RNdJk

Comments

Popular posts from this blog

I get wrong characters when retreiving the message body of an email using TIdIMAP4.UIDRetrieveTextPeek2()

How to drop the all the 1's in a correlation matrix

Today Walkin 14th-Sept