Tips.PHP: Removing empty strings, NULL, FALSE, and negative numbers from Array

Often we need to remove empty elements from our array. For example when we split a string with space, we can get the words and also blank strings when there are two or more spaces put together. We can use array_filter function for rescue. When we call array_filter with out passing the filter function it removes all values that evaluate to FALSE. <?php $string = "I love   Luracast...

Read More