note 56486 deleted from ref.array by aidan
| From: | aidan@php.net | Date: | Sun, 09 Oct 2005 09:11:40 +0000 |
| Subject: | note 56486 deleted from ref.array by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-96725@lists.php.net to get a copy of this message | ||
Note Submitter: Moxley Stratton
----
<?php
function my_array_delete_by_key($array, $item) {
if (array_key_exists($item, $array))
unset($array[$item]);
return array_merge($array);
}
?>
This will delete elements that have null values too.