Re: Array question

From: Date: Sat, 26 Apr 2003 18:45:57 +0000
Subject: Re: Array question
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-145370@lists.php.net to get a copy of this message
Did that: PHP replied Invalid argument for foreach() Robin Kopetzky ----- Original Message ----- From: Jason Wong <php-general@gremlins.biz> To: <php-general@lists.php.net> Sent: Saturday, April 26, 2003 12:39 Subject: Re: [PHP] Array question > 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!! > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#145370) next »