Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62201 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96931 invoked from network); 15 Aug 2012 20:18:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Aug 2012 20:18:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@mindplay.dk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@mindplay.dk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mindplay.dk from 209.85.160.170 cause and error) X-PHP-List-Original-Sender: rasmus@mindplay.dk X-Host-Fingerprint: 209.85.160.170 mail-gh0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:34015] helo=mail-gh0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 97/34-08779-0140C205 for ; Wed, 15 Aug 2012 16:18:25 -0400 Received: by ghbg24 with SMTP id g24so2462546ghb.29 for ; Wed, 15 Aug 2012 13:18:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-gm-message-state; bh=LlXUokLFNCMqMLfZwnqRrPzkvDkQpsavAw+4ePL/AG8=; b=aCRvk+oL+1rWjdJpwfJWAyYZXdlJdpB/WiWIm/hks4eLgOnFDMJwgVPjikyEbVobj1 WTNHHxBLCPyzrDa++7dqW3M9ivoAIIlL8es0b7SHu5nX8G1GLSQNHe6NdvykwHQenzKF auXUijWDLdGA7Pl3E2ljGIcGWwRMIBPOph+6tbNhGT8A+z87CgCsSTqAX/pYHD+zZjz4 klOjVHTFfk5FNbYc6cKYrSgVVFix3wujyvli+ICqpgSDB++FXgTkeY0DzGtlvzjMYFXW fznWEawLMjbJ9lKJWglYj2pEez5g527cMCC2lfwMtfHyRlKu2eBaEPJ02mr0BR3hQW3p 28KQ== MIME-Version: 1.0 Received: by 10.50.222.162 with SMTP id qn2mr20168158igc.46.1345061901710; Wed, 15 Aug 2012 13:18:21 -0700 (PDT) Received: by 10.231.102.9 with HTTP; Wed, 15 Aug 2012 13:18:21 -0700 (PDT) Date: Wed, 15 Aug 2012 16:18:21 -0400 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=14dae9340fbfda353104c753a042 X-Gm-Message-State: ALoCoQnKu4W/ut3Je9P5yJAAlEordsEkMeBFnA/g5L6dyt/bqATuhaRhP/emV9C+HQqXO/jZ0eyb Subject: removing an item from an array From: rasmus@mindplay.dk (Rasmus Schultz) --14dae9340fbfda353104c753a042 Content-Type: text/plain; charset=ISO-8859-1 How come there is no straight-foward obvious way to simply remove a given value from an array? Just look at the number of horrible ways people solve this obvious problem: http://stackoverflow.com/questions/7225070/php-array-delete-by-value-not-key Shouldn't we have something simple, like: array_remove($array, $value) : array (returns a new array) and/or array_delete(&$array, $value) : bool (modifies array directly) ? --14dae9340fbfda353104c753a042--