Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54952 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16472 invoked from network); 25 Aug 2011 22:30:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Aug 2011 22:30:40 -0000 Received: from [127.0.0.1] ([127.0.0.1:19775]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 41/63-20800-01DC65E4 for ; Thu, 25 Aug 2011 18:30:40 -0400 X-Host-Fingerprint: 212.159.110.144 mwgray.force9.co.uk Received: from [212.159.110.144] ([212.159.110.144:9033] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 36/33-20800-E21C65E4 for ; Thu, 25 Aug 2011 17:39:59 -0400 Message-ID: <36.33.20800.E21C65E4@pb1.pair.com> To: internals@lists.php.net Date: Thu, 25 Aug 2011 22:39:24 +0100 Lines: 26 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6002.18197 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18463 X-Posted-By: 212.159.110.144 Subject: transversing associative arrays from C From: ang.usenet@gmail.com ("Aaron Gray") Hi, I am working on a C extension module for PHP and am wondering about an API issue. I can see how to add to an associative array :- zval *aa; MAKE_STD_ZVAL(aa); array_init(aa); add_assoc_string(aa, "test", "test value", 1); but how do I transverse an associative array of values in a for loop simular to using "foreach" in PHP ? Hope this is not too OT for this list, but I could not find a better place to ask the question. I have looked through the API SVN sources and this seems like a possible blind spot. Many thanks in advance, Aaron