Remove empty elements from an array


/ Published in: PHP
Save to your folder(s)

Removes 'false', '0', 'null' or '' from the array


Copy this code and paste it in your HTML
  1. $my_arr = array_filter($my_arr);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.