Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51152 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6773 invoked from network); 31 Dec 2010 13:49:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Dec 2010 13:49:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=rquadling@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rquadling@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.177 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@gmail.com X-Host-Fingerprint: 209.85.216.177 mail-qy0-f177.google.com Received: from [209.85.216.177] ([209.85.216.177:59751] helo=mail-qy0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/A0-01063-26FDD1D4 for ; Fri, 31 Dec 2010 08:49:22 -0500 Received: by qyk27 with SMTP id 27so11911700qyk.8 for ; Fri, 31 Dec 2010 05:49:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:reply-to:from :date:message-id:subject:to:content-type; bh=hvisED5Y2q4XbX2JgHjDeIexzks88sAxN/kaLS93ZmU=; b=SBvPA13kjNPp7xZyEDv3paPfCEjL6Sp+mcEzdvOgV5e+2SR8c4bVF3sSDkrQjf5qTQ 0k7tj/tLI4iHmoQSwEQh63kDsKYlAhYAYjG+Wc9k7iN9/a5Cn/CvcUUEVOVQ6a9fMA+y W7bJdwuhtPOLkQQUkDCurUNRo0FIO/rfHShCw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:from:date:message-id:subject:to:content-type; b=mPYMQJZQy272/Q2T3qmms2u7nuM2l0FAoY59e7XFey+DjcVSmVX8pMe+9rgVJH8/QG MNQ5PUvlcbCGHeAO6MXwbe+tvBnxvoVuMMwsWWxcoByYskwFvL75EooTNVF31Z0644Aj yka09evSkVMd9bG0tJvawTQMYOgAXfYA7VN50= Received: by 10.229.228.2 with SMTP id jc2mr15404921qcb.177.1293803359652; Fri, 31 Dec 2010 05:49:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.100.130 with HTTP; Fri, 31 Dec 2010 05:48:59 -0800 (PST) Reply-To: RQuadling@googlemail.com Date: Fri, 31 Dec 2010 13:48:59 +0000 Message-ID: To: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Working with arrays. From: rquadling@gmail.com (Richard Quadling) Hi. What macros exist regarding processing arrays in PHP (core not userland)? I want to pass ... array('value1', 'value2', 'value3') to a function and in the function have it converted to 'value1\0value2\0value3\0\0'. Conventionally, I'd need to iterate the array to get the lengths of all the elements, add the number of elements to this value and then 1 more for the trailing \0. Unless there are some macros to allow to do this sort of thing more easily. Regards, Richard Quadling. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY