Newsgroups: php.general,php.internals Path: news.php.net Xref: news.php.net php.general:209106 php.internals:15133 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26914 invoked by uid 1010); 21 Feb 2005 06:25:45 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 26849 invoked from network); 21 Feb 2005 06:25:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Feb 2005 06:25:44 -0000 X-Host-Fingerprint: 64.233.184.203 wproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.184.203:13295] helo=wproxy.gmail.com) by pb1.pair.com (ecelerity 1.2 (r4437)) with SMTP id 35/FE-32941-8EE79124 for ; Mon, 21 Feb 2005 01:25:44 -0500 Received: by wproxy.gmail.com with SMTP id 57so691675wri for ; Sun, 20 Feb 2005 22:25:42 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=f++4uE9zHFJlW5dS94juAHHbKExhGW0Lwpxkv8rUqZ74oqrS+LjXSsSzd/za5bloJmuI0f5lZlyvunOjW1azapzzdg17sNBiOxmf71DGd2DQtWdRW/Z+w2uI14zw2UX6KHS6pTcKAze33ySX/BIbAxLGx8yynrGBzjSsTU8a3mE= Received: by 10.54.26.43 with SMTP id 43mr155400wrz; Sun, 20 Feb 2005 22:25:42 -0800 (PST) Received: from ?64.179.49.20? ([64.179.49.20]) by smtp.gmail.com with ESMTP id 65sm161987wra.2005.02.20.22.25.39; Sun, 20 Feb 2005 22:25:42 -0800 (PST) Message-ID: <42197EDC.8090500@gmail.com> Date: Mon, 21 Feb 2005 01:25:32 -0500 User-Agent: Mozilla Thunderbird 0.9 (X11/20041127) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Chris Cranford CC: php-general@lists.php.net, internals@lists.php.net References: <006101c517b0$04eb2750$71f69d44@setechusa.com> In-Reply-To: <006101c517b0$04eb2750$71f69d44@setechusa.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP] PHP Extension & Arrays From: joe.wollard@gmail.com (Joe Wollard) 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 "
" . $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? > > >