# Equivalent to foreach($Items as $Item) with ZVals

- Thread: https://externals.io/message/43214
- Original archive: https://news-web.php.net/php.internals/43214
- Started by Matthew C. Rice on 2009-02-27T20:39:18+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #43214 — Matthew C. Rice — 2009-02-27T20:39:18+00:00

URL: https://externals.io/message/43214#43214

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
