Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42383 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68485 invoked from network); 26 Dec 2008 18:04:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Dec 2008 18:04:27 -0000 Authentication-Results: pb1.pair.com smtp.mail=drwoland@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=drwoland@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.21 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: drwoland@gmail.com X-Host-Fingerprint: 209.85.218.21 mail-bw0-f21.google.com Received: from [209.85.218.21] ([209.85.218.21:37799] helo=mail-bw0-f21.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/BA-33750-AAC15594 for ; Fri, 26 Dec 2008 13:04:27 -0500 Received: by bwz14 with SMTP id 14so10247252bwz.23 for ; Fri, 26 Dec 2008 10:04:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type:references :x-google-sender-auth; bh=gf5Xbovy28A1WCWL9fHInK+Xk7UxZuabyq33RgBwIGE=; b=aKAayxgmwwvqx8w5aWzPcvoFXGLMmdLNl3BlgG3572DKWNVh8IlcU/S0huenNv6lnU nqQuX4QMlT7qJhD+XDHacigmydAx/duOAZozDWO7LcXR3WSEiAvEUV1b+aJBZJw2Uslw UHtNzRmetbvL+SOBL4x4phBkY4GMV/WVGNFoQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:references:x-google-sender-auth; b=rRSww+DIdUKJIxSMywebWjaFq054C0fsNdBf1KkSJDZNKOXc15+w2Vfo2cdUK3n/qm So+vqVOJezwEJXIKFt4/Mkd9XeueIzYb/84Bti1aStXSq6E/0Chht/WNOBbCzb9o6Nvy Azm75lZB4B7uDE5EJZr9cbVxhfnFOlfAZTvLg= Received: by 10.181.58.9 with SMTP id l9mr4056898bkk.98.1230314663404; Fri, 26 Dec 2008 10:04:23 -0800 (PST) Received: by 10.181.227.16 with HTTP; Fri, 26 Dec 2008 10:04:23 -0800 (PST) Message-ID: <5faa7b820812261004j599e1aafo6fab154063c34cca@mail.gmail.com> Date: Fri, 26 Dec 2008 10:04:23 -0800 Sender: drwoland@gmail.com To: "Kevin Waterson" Cc: internals@lists.php.net In-Reply-To: <20081227005523.2961ecd4.kevin@phpro.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_122762_24230647.1230314663378" References: <5faa7b820812260106p6f24bf0ct49ef574e5ed4e2c2@mail.gmail.com> <20081227005523.2961ecd4.kevin@phpro.org> X-Google-Sender-Auth: 514bd688cb70f714 Subject: Re: [PHP-DEV] Proposal: array_flatten function From: m@mihasya.com ("Mike Panchenko") ------=_Part_122762_24230647.1230314663378 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Why not just link straight to the tutorial on your site? ;) Not sure what your point is, other than "there's a way to do this in userland," which I cover in my email. Maybe some sentences to accompany it would make it easier to understand. Thanks for reading. Cheers. Mike. On Fri, Dec 26, 2008 at 5:55 AM, Kevin Waterson wrote: > This one time, at band camp, "Mike Panchenko" wrote: > > > Hey everybody, I'm new both to the list and to hacking the internals, so > > I'll try to keep it short and humble. > > > > I've written an array_flatten function which just takes all elements from > a > > nested array and pushes them into a single indexed array. > > function flattenArray(array $array){ > $ret_array = array(); > foreach(new RecursiveIteratorIterator(new RecursiveArrayIterator($array)) > as $value) > { > $ret_array[] = $value; > } > return $ret_array; > } > > Kevin > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > ------=_Part_122762_24230647.1230314663378--