note 89354 added to function.array-search

From: Date: Wed, 04 Mar 2009 14:47:39 +0000
Subject: note 89354 added to function.array-search
Groups: php.notes 
Request: Send a blank email to php-notes+get-151454@lists.php.net to get a copy of this message
Usefull procedure: <?php function array_search_and_destroy($needle, &$haystack, $strict = false) { $key = array_search($needle, $haystack, $strict); if(is_null($key) == false && $key !== false) unset($haystack[$key]); return $key; } ?> Astalavista baby. ---- Server IP: 200.185.126.110 Probable Submitter: 200.198.70.2 ---- Manual Page -- http://www.php.net/manual/en/function.array-search.php Edit -- https://master.php.net/note/edit/89354 Del: integrated -- https://master.php.net/note/delete/89354/integrated Del: useless -- https://master.php.net/note/delete/89354/useless Del: bad code -- https://master.php.net/note/delete/89354/bad+code Del: spam -- https://master.php.net/note/delete/89354/spam Del: non-english -- https://master.php.net/note/delete/89354/non-english Del: in docs -- https://master.php.net/note/delete/89354/in+docs Del: other reasons-- https://master.php.net/note/delete/89354 Reject -- https://master.php.net/note/reject/89354 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#151454) next »