Remove Empty/Null Rows from array using PHP
I got so many empty element as well as null values in array and my SQL query is some what complex so i was not able to use IS NOT NULL in mysql Query. Only alternative way i have is removing this null values from array using PHP. I used is_null function of PHP and remove null elements from array. Be careful with “” and null as they are two different things. I you want to remove empty elements as well than you can use one more condition along with is_null. Look at below code. I hope this helps you a little.
Let me know if you have any problem.