Re: Array question

From: Date: Sat, 26 Apr 2003 18:39:24 +0000
Subject: Re: Array question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-145368@lists.php.net to get a copy of this message
On Sunday 27 April 2003 02:35, Sparky Kopetzky wrote: > Is there any way while iterating through an array, a function, etc. that > will extract the current 'key' value?? > > Example: $attributes['INPUT'] = 'hidden'; > > I want a way to get $key to = 'INPUT' and $value to = 'hidden'. foreach($array as $key => $value) { echo "Key: $key Value: $value<br>"; } -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Uh-oh!! I'm having TOO MUCH FUN!! */

« previous php.general (#145368) next »