Reply to Re: [PHP] PHP Extension & Arrays

Your name:

Reply:


Posted by Joe Wollard on 02/21/05 08:25

Chris,

I have a feeling I'm missing something but from what I'm gathering you
want to be able to use the key of the array right along with the value.
If that's what you need then the following should work:

$array = my_array_creating_function();

while(list($key, $val) = each($array)){
echo "<br />" . $val . " is the value of " . $key;
}


Hope this was of some help!

Chris Cranford wrote:

>If I have a function that creates an array using add_assoc_string and then
>adds it to the return value as add_property_zval, then how do I iterate over
>the array and get the key and its value?
>
>
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация