Question and answer is powered by AnsPress.io
I have an array like
<?php $array=array('name'=>,'id'=>10,'age'=>35) ?>
I want to remove the null element from the array.
You can simply use array_filter(), which conveniently handles all this for you:
<?php print_r(array_filter($array)); ?>