How to remove empty element or NULL values from PHP array?

Okay let say that we have the following array

In our array above we have an empty element which is [3], so how to get rid of it? will that’s not a problem I will explain it here.

After searching and digging on the net I found 4 to 10 lines of code but I believed that there should be a simple possible solution for this, then I tried searching over site and I found this very useful php array function array_filter().

To remove NULL values

To remove all false values

That’s it and it works like a charm;)

by Ryan Sutana

  • Cast beyond the fish, bringing the bait back past it using a fast retrieve.
    Mulberry uk outlet

  • This is actually a smart blog. I mean it. You’ve so much understanding about this issue, and so a lot passion. You also know the way to make men and women rally behind it, naturally from the responses. Youve got a design here thats not too flashy, but makes a statement as big as what youre saying. Great job, indeed.

  • Eating a healthy, sensible diet can make slim arms much more attainable.
    visit this link