note 37215 deleted from function.key by didou

From: Date: Fri, 07 Nov 2003 08:35:25 +0000
Subject: note 37215 deleted from function.key by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-60051@lists.php.net to get a copy of this message
Note Submitter: fontajos@phpeppershop.com ---- /** * Function delArrayElementByKey * * Deletes an arbitrary element in the given array $array_with_elements. * The element which will be deleted is referenced by the array key $key_name. * * @param array $array_with_elements * @param string $key_name * @return array array without element referenced by $key_name */ function delArrayElementByKey($array_with_elements, $key_name) { $key_index = array_keys(array_keys($array_with_elements), $key_name); array_splice($array_with_elements, $key_index[0], 1); return $array_with_elements; }// End function delArrayElementByKey

« previous php.notes (#60051) next »