Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43214 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76732 invoked from network); 27 Feb 2009 20:39:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2009 20:39:24 -0000 X-Host-Fingerprint: 66.153.171.97 rcs.us Received: from [66.153.171.97] ([66.153.171.97:16974] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 50/BC-10839-97F48A94 for ; Fri, 27 Feb 2009 15:39:22 -0500 Message-ID: <50.BC.10839.97F48A94@pb1.pair.com> To: internals@lists.php.net Date: Fri, 27 Feb 2009 15:39:18 -0500 User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 66.153.171.97 Subject: Equivalent to foreach($Items as $Item) with ZVals From: mrice@rcs.us ("Matthew C. Rice") Hello again, I currently have something like http://pastebin.com/m1589b69f in PHP, I am trying to see if there is a equivalent function in any of the zend_hash_xxx functions. I have a multi-dimensional array, that to the best of what I have found so far the only solution would be to nest the following code http://pastebin.com/m6b6675a1 inside itself. Basically a for() statement in a for() statement, which doesn't seem to be the most effective way, then again I have really only ever used arrays like this in PHP. Never in plain C or C++. Just char** in C, and some Map derivative ( IE QMap in the Qt Framework ) in C++. Sorry about the tail off there. Anyway, should I be looking at this another way, or should it be done with the multiple for() statements? By the way, that code chunk by itself just prints the word Array, which is expected since currently its only being executed once. BTW, I expect my "Extending and Embedding PHP" book to be here tomorrow, so hopefully these questions ( especially if they are obviously answered there will come to a end :-) ) . Matthew C. Rice