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 inmysql Query. Only alternative way i have is removing this null values from array using PHP. I used is_null function of PHP and remove …